Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 564935689ab5527f955e5449ded02799 > files > 5147

rust-doc-1.19.0-1.mga6.armv7hl.rpm

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="rustdoc">
    <meta name="description" content="API documentation for the Rust `SyncSender` struct in crate `std`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, SyncSender">

    <title>std::sync::mpsc::SyncSender - Rust</title>

    <link rel="stylesheet" type="text/css" href="../../../normalize.css">
    <link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
    <link rel="stylesheet" type="text/css" href="../../../main.css">
    

    <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
    
</head>
<body class="rustdoc struct">
    <!--[if lte IE 8]>
    <div class="warning">
        This old browser is unsupported and will most likely display funky
        things.
    </div>
    <![endif]-->

    

    <nav class="sidebar">
        <a href='../../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a>
        <p class='location'>Struct SyncSender</p><div class="block items"><ul><li><a href="#methods">Methods</a></li><li><a href="#implementations">Trait Implementations</a></li></ul></div><p class='location'><a href='../../index.html'>std</a>::<wbr><a href='../index.html'>sync</a>::<wbr><a href='index.html'>mpsc</a></p><script>window.sidebarCurrent = {name: 'SyncSender', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
    </nav>

    <nav class="sub">
        <form class="search-form js-only">
            <div class="search-container">
                <input class="search-input" name="search"
                       autocomplete="off"
                       placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
                       type="search">
            </div>
        </form>
    </nav>

    <section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../../index.html'>std</a>::<wbr><a href='../index.html'>sync</a>::<wbr><a href='index.html'>mpsc</a>::<wbr><a class="struct" href=''>SyncSender</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><span id='render-detail'>
                   <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
                       [<span class='inner'>&#x2212;</span>]
                   </a>
               </span><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#551-553' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct SyncSender&lt;T&gt; { /* fields omitted */ }</pre><div class='docblock'><p>The sending-half of Rust&#39;s synchronous <a href="fn.sync_channel.html"><code>sync_channel</code></a> type.
This half can only be owned by one thread, but it can be cloned
to send to other threads.</p>

<p>Messages can be sent through this channel with <a href="struct.SyncSender.html#method.send"><code>send</code></a> or <a href="struct.SyncSender.html#method.try_send"><code>try_send</code></a>.</p>

<p><a href="struct.SyncSender.html#method.send"><code>send</code></a> will block if there is no space in the internal buffer.</p>

<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">mpsc</span>::<span class="ident">sync_channel</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;

<span class="comment">// Create a sync_channel with buffer size 2</span>
<span class="kw">let</span> (<span class="ident">sync_sender</span>, <span class="ident">receiver</span>) <span class="op">=</span> <span class="ident">sync_channel</span>(<span class="number">2</span>);
<span class="kw">let</span> <span class="ident">sync_sender2</span> <span class="op">=</span> <span class="ident">sync_sender</span>.<span class="ident">clone</span>();

<span class="comment">// First thread owns sync_sender</span>
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
    <span class="ident">sync_sender</span>.<span class="ident">send</span>(<span class="number">1</span>).<span class="ident">unwrap</span>();
    <span class="ident">sync_sender</span>.<span class="ident">send</span>(<span class="number">2</span>).<span class="ident">unwrap</span>();
});

<span class="comment">// Second thread owns sync_sender2</span>
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
    <span class="ident">sync_sender2</span>.<span class="ident">send</span>(<span class="number">3</span>).<span class="ident">unwrap</span>();
    <span class="comment">// thread will now block since the buffer is full</span>
    <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Thread unblocked!&quot;</span>);
});

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">msg</span>;

<span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>);

<span class="comment">// &quot;Thread unblocked!&quot; will be printed now</span>

<span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>);

<span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();

<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=fn%20main()%20%7B%0Ause%20std%3A%3Async%3A%3Ampsc%3A%3Async_channel%3B%0Ause%20std%3A%3Athread%3B%0A%0A%2F%2F%20Create%20a%20sync_channel%20with%20buffer%20size%202%0Alet%20(sync_sender%2C%20receiver)%20%3D%20sync_channel(2)%3B%0Alet%20sync_sender2%20%3D%20sync_sender.clone()%3B%0A%0A%2F%2F%20First%20thread%20owns%20sync_sender%0Athread%3A%3Aspawn(move%20%7C%7C%20%7B%0A%20%20%20%20sync_sender.send(1).unwrap()%3B%0A%20%20%20%20sync_sender.send(2).unwrap()%3B%0A%7D)%3B%0A%0A%2F%2F%20Second%20thread%20owns%20sync_sender2%0Athread%3A%3Aspawn(move%20%7C%7C%20%7B%0A%20%20%20%20sync_sender2.send(3).unwrap()%3B%0A%20%20%20%20%2F%2F%20thread%20will%20now%20block%20since%20the%20buffer%20is%20full%0A%20%20%20%20println!(%22Thread%20unblocked!%22)%3B%0A%7D)%3B%0A%0Alet%20mut%20msg%3B%0A%0Amsg%20%3D%20receiver.recv().unwrap()%3B%0Aprintln!(%22message%20%7B%7D%20received%22%2C%20msg)%3B%0A%0A%2F%2F%20%22Thread%20unblocked!%22%20will%20be%20printed%20now%0A%0Amsg%20%3D%20receiver.recv().unwrap()%3B%0Aprintln!(%22message%20%7B%7D%20received%22%2C%20msg)%3B%0A%0Amsg%20%3D%20receiver.recv().unwrap()%3B%0A%0Aprintln!(%22message%20%7B%7D%20received%22%2C%20msg)%3B%0A%7D">Run</a></pre>
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#935-1037' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.send' class="method"><span id='send.v' class='invisible'><code>fn <a href='#method.send' class='fnname'>send</a>(&amp;self, t: T) -&gt; <a class="enum" href="../../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../../primitive.tuple.html">()</a>, <a class="struct" href="../../../std/sync/mpsc/struct.SendError.html" title="struct std::sync::mpsc::SendError">SendError</a>&lt;T&gt;&gt;</code></span></h4>
<div class='docblock'><p>Sends a value on this synchronous channel.</p>

<p>This function will <em>block</em> until space in the internal buffer becomes
available or a receiver is available to hand off the message to.</p>

<p>Note that a successful send does <em>not</em> guarantee that the receiver will
ever see the data if there is a buffer on this channel. Items may be
enqueued in the internal buffer for the receiver to receive at a later
time. If the buffer size is 0, however, the channel becomes a rendezvous
channel and it guarantees that the receiver has indeed received
the data if this function returns success.</p>

<p>This function will never panic, but it may return <a href="../../../std/result/enum.Result.html#variant.Err"><code>Err</code></a> if the
<a href="../../../std/sync/mpsc/struct.Receiver.html"><code>Receiver</code></a> has disconnected and is no longer able to receive
information.</p>

<h1 id='examples-1' class='section-header'><a href='#examples-1'>Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">mpsc</span>::<span class="ident">sync_channel</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;

<span class="comment">// Create a rendezvous sync_channel with buffer size 0</span>
<span class="kw">let</span> (<span class="ident">sync_sender</span>, <span class="ident">receiver</span>) <span class="op">=</span> <span class="ident">sync_channel</span>(<span class="number">0</span>);

<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
   <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;sending message...&quot;</span>);
   <span class="ident">sync_sender</span>.<span class="ident">send</span>(<span class="number">1</span>).<span class="ident">unwrap</span>();
   <span class="comment">// Thread is now blocked until the message is received</span>

   <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;...message received!&quot;</span>);
});

<span class="kw">let</span> <span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1</span>, <span class="ident">msg</span>);<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=fn%20main()%20%7B%0Ause%20std%3A%3Async%3A%3Ampsc%3A%3Async_channel%3B%0Ause%20std%3A%3Athread%3B%0A%0A%2F%2F%20Create%20a%20rendezvous%20sync_channel%20with%20buffer%20size%200%0Alet%20(sync_sender%2C%20receiver)%20%3D%20sync_channel(0)%3B%0A%0Athread%3A%3Aspawn(move%20%7C%7C%20%7B%0A%20%20%20println!(%22sending%20message...%22)%3B%0A%20%20%20sync_sender.send(1).unwrap()%3B%0A%20%20%20%2F%2F%20Thread%20is%20now%20blocked%20until%20the%20message%20is%20received%0A%0A%20%20%20println!(%22...message%20received!%22)%3B%0A%7D)%3B%0A%0Alet%20msg%20%3D%20receiver.recv().unwrap()%3B%0Aassert_eq!(1%2C%20msg)%3B%0A%7D">Run</a></pre>
</div><h4 id='method.try_send' class="method"><span id='try_send.v' class='invisible'><code>fn <a href='#method.try_send' class='fnname'>try_send</a>(&amp;self, t: T) -&gt; <a class="enum" href="../../../std/result/enum.Result.html" title="enum std::result::Result">Result</a>&lt;<a class="primitive" href="../../primitive.tuple.html">()</a>, <a class="enum" href="../../../std/sync/mpsc/enum.TrySendError.html" title="enum std::sync::mpsc::TrySendError">TrySendError</a>&lt;T&gt;&gt;</code></span></h4>
<div class='docblock'><p>Attempts to send a value on this channel without blocking.</p>

<p>This method differs from <a href="../../../std/sync/mpsc/struct.SyncSender.html#method.send"><code>send</code></a> by returning immediately if the
channel&#39;s buffer is full or no receiver is waiting to acquire some
data. Compared with <a href="../../../std/sync/mpsc/struct.SyncSender.html#method.send"><code>send</code></a>, this function has two failure cases
instead of one (one for disconnection, one for a full buffer).</p>

<p>See <a href="../../../std/sync/mpsc/struct.SyncSender.html#method.send"><code>send</code></a> for notes about guarantees of whether the
receiver has received the data or not if this function is successful.</p>

<h1 id='examples-2' class='section-header'><a href='#examples-2'>Examples</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">mpsc</span>::<span class="ident">sync_channel</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;

<span class="comment">// Create a sync_channel with buffer size 1</span>
<span class="kw">let</span> (<span class="ident">sync_sender</span>, <span class="ident">receiver</span>) <span class="op">=</span> <span class="ident">sync_channel</span>(<span class="number">1</span>);
<span class="kw">let</span> <span class="ident">sync_sender2</span> <span class="op">=</span> <span class="ident">sync_sender</span>.<span class="ident">clone</span>();

<span class="comment">// First thread owns sync_sender</span>
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
    <span class="ident">sync_sender</span>.<span class="ident">send</span>(<span class="number">1</span>).<span class="ident">unwrap</span>();
    <span class="ident">sync_sender</span>.<span class="ident">send</span>(<span class="number">2</span>).<span class="ident">unwrap</span>();
    <span class="comment">// Thread blocked</span>
});

<span class="comment">// Second thread owns sync_sender2</span>
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">||</span> {
    <span class="comment">// This will return an error and send</span>
    <span class="comment">// no message if the buffer is full</span>
    <span class="ident">sync_sender2</span>.<span class="ident">try_send</span>(<span class="number">3</span>).<span class="ident">is_err</span>();
});

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">msg</span>;
<span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>);

<span class="ident">msg</span> <span class="op">=</span> <span class="ident">receiver</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>);

<span class="comment">// Third message may have never been sent</span>
<span class="kw">match</span> <span class="ident">receiver</span>.<span class="ident">try_recv</span>() {
    <span class="prelude-val">Ok</span>(<span class="ident">msg</span>) <span class="op">=&gt;</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;message {} received&quot;</span>, <span class="ident">msg</span>),
    <span class="prelude-val">Err</span>(_) <span class="op">=&gt;</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;the third message was never sent&quot;</span>),
}<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=fn%20main()%20%7B%0Ause%20std%3A%3Async%3A%3Ampsc%3A%3Async_channel%3B%0Ause%20std%3A%3Athread%3B%0A%0A%2F%2F%20Create%20a%20sync_channel%20with%20buffer%20size%201%0Alet%20(sync_sender%2C%20receiver)%20%3D%20sync_channel(1)%3B%0Alet%20sync_sender2%20%3D%20sync_sender.clone()%3B%0A%0A%2F%2F%20First%20thread%20owns%20sync_sender%0Athread%3A%3Aspawn(move%20%7C%7C%20%7B%0A%20%20%20%20sync_sender.send(1).unwrap()%3B%0A%20%20%20%20sync_sender.send(2).unwrap()%3B%0A%20%20%20%20%2F%2F%20Thread%20blocked%0A%7D)%3B%0A%0A%2F%2F%20Second%20thread%20owns%20sync_sender2%0Athread%3A%3Aspawn(move%20%7C%7C%20%7B%0A%20%20%20%20%2F%2F%20This%20will%20return%20an%20error%20and%20send%0A%20%20%20%20%2F%2F%20no%20message%20if%20the%20buffer%20is%20full%0A%20%20%20%20sync_sender2.try_send(3).is_err()%3B%0A%7D)%3B%0A%0Alet%20mut%20msg%3B%0Amsg%20%3D%20receiver.recv().unwrap()%3B%0Aprintln!(%22message%20%7B%7D%20received%22%2C%20msg)%3B%0A%0Amsg%20%3D%20receiver.recv().unwrap()%3B%0Aprintln!(%22message%20%7B%7D%20received%22%2C%20msg)%3B%0A%0A%2F%2F%20Third%20message%20may%20have%20never%20been%20sent%0Amatch%20receiver.try_recv()%20%7B%0A%20%20%20%20Ok(msg)%20%3D%3E%20println!(%22message%20%7B%7D%20received%22%2C%20msg)%2C%0A%20%20%20%20Err(_)%20%3D%3E%20println!(%22the%20third%20message%20was%20never%20sent%22)%2C%0A%7D%0A%7D">Run</a></pre>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; <a class="trait" href="../../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> for <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#556' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl&lt;T&gt; !<a class="trait" href="../../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> for <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#559' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../../std/clone/trait.Clone.html" title="trait std::clone::Clone">Clone</a> for <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#1040-1045' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='../../../std/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="../../../std/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='../../../std/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="../../../std/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../../std/ops/trait.Drop.html" title="trait std::ops::Drop">Drop</a> for <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#1048-1052' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v' class='invisible'><code>fn <a href='../../../std/ops/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span></h4>
<div class='docblock'><p>A method called when the value goes out of scope. <a href="../../../std/ops/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="../../../std/fmt/trait.Debug.html" title="trait std::fmt::Debug">Debug</a> for <a class="struct" href="../../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.8.0'>1.8.0</div><a class='srclink' href='../../../src/std/sync/mpsc/mod.rs.html#1055-1059' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='../../../std/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="../../../std/fmt/struct.Formatter.html" title="struct std::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="../../../std/fmt/type.Result.html" title="type std::fmt::Result">Result</a></code></span></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div></section>
    <section id='search' class="content hidden"></section>

    <section class="footer"></section>

    <aside id="help" class="hidden">
        <div>
            <h1 class="hidden">Help</h1>

            <div class="shortcuts">
                <h2>Keyboard Shortcuts</h2>

                <dl>
                    <dt>?</dt>
                    <dd>Show this help dialog</dd>
                    <dt>S</dt>
                    <dd>Focus the search field</dd>
                    <dt>&larrb;</dt>
                    <dd>Move up in search results</dd>
                    <dt>&rarrb;</dt>
                    <dd>Move down in search results</dd>
                    <dt>&#9166;</dt>
                    <dd>Go to active search result</dd>
                    <dt>+</dt>
                    <dd>Collapse/expand all sections</dd>
                </dl>
            </div>

            <div class="infos">
                <h2>Search Tricks</h2>

                <p>
                    Prefix searches with a type followed by a colon (e.g.
                    <code>fn:</code>) to restrict the search to a given type.
                </p>

                <p>
                    Accepted types are: <code>fn</code>, <code>mod</code>,
                    <code>struct</code>, <code>enum</code>,
                    <code>trait</code>, <code>type</code>, <code>macro</code>,
                    and <code>const</code>.
                </p>

                <p>
                    Search functions by type signature (e.g.
                    <code>vec -> usize</code> or <code>* -> vec</code>)
                </p>
            </div>
        </div>
    </aside>

    

    <script>
        window.rootPath = "../../../";
        window.currentCrate = "std";
    </script>
    <script src="../../../main.js"></script>
    <script defer src="../../../search-index.js"></script>
</body>
</html>