Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > fdedb3cf2140df9b6d419a2338ab1caa > files > 4915

rust-doc-1.25.0-1.mga6.x86_64.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 `Send` trait in crate `std`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, Send">

    <title>std::marker::Send - Rust</title>

    <link rel="stylesheet" type="text/css" href="../../normalize.css">
    <link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
    
    <link rel="stylesheet" type="text/css" href="../../dark.css">
    <link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
    <script src="../../storage.js"></script>
    

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

    

    <nav class="sidebar">
        <div class="sidebar-menu">&#9776;</div>
        <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'>Trait Send</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>marker</a></p><script>window.sidebarCurrent = {name: 'Send', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
    </nav>

    <div class="theme-picker">
        <button id="theme-picker" aria-label="Pick another theme!">
            <img src="../../brush.svg" width="18" alt="Pick another theme!">
        </button>
        <div id="theme-choices"></div>
    </div>
    <script src="../../theme.js"></script>
    <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'>Trait <a href='../index.html'>std</a>::<wbr><a href='index.html'>marker</a>::<wbr><a class="trait" href=''>Send</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/core/marker.rs.html#43-45' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub unsafe auto trait Send { }</pre><div class='docblock'><p>Types that can be transferred across thread boundaries.</p>
<p>This trait is automatically implemented when the compiler determines it's
appropriate.</p>
<p>An example of a non-<code>Send</code> type is the reference-counting pointer
<a href="../../std/rc/struct.Rc.html"><code>rc::Rc</code></a>. If two threads attempt to clone <a href="../../std/rc/struct.Rc.html"><code>Rc</code></a>s that point to the same
reference-counted value, they might try to update the reference count at the
same time, which is <a href="../../reference/behavior-considered-undefined.html">undefined behavior</a> because <a href="../../std/rc/struct.Rc.html"><code>Rc</code></a> doesn't use atomic
operations. Its cousin <a href="../../std/sync/struct.Arc.html"><code>sync::Arc</code></a> does use atomic operations (incurring
some overhead) and thus is <code>Send</code>.</p>
<p>See <a href="../../nomicon/send-and-sync.html">the Nomicon</a> for more details.</p>
</div>
        <h2 id='implementors' class='small-section-header'>
          Implementors<a href='#implementors' class='anchor'></a>
        </h2>
        <ul class='item-list' id='implementors-list'>
    <li><div class='out-of-band'><a class='srclink' href='../../src/core/marker.rs.html#50' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; !Send for <a class="primitive" href="../primitive.pointer.html">*mut T</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/slice/mod.rs.html#1408' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::slice::<a class="struct" href="../../std/slice/struct.Iter.html" title="struct std::slice::Iter">Iter</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ptr.rs.html#2493' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; !Send for <a class="struct" href="../../std/ptr/struct.NonNull.html" title="struct std::ptr::NonNull">NonNull</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#859' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/cell/struct.RefCell.html" title="struct std::cell::RefCell">RefCell</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/ptr.rs.html#2358' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/ptr/struct.Unique.html" title="struct std::ptr::Unique">Unique</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/marker.rs.html#546' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for <a class="primitive" href="../primitive.reference.html">&amp;'a </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/marker.rs.html#48' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; !Send for <a class="primitive" href="../primitive.pointer.html">*const T</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/marker.rs.html#548' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/sync/atomic.rs.html#164' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/sync/atomic/struct.AtomicPtr.html" title="struct std::sync::atomic::AtomicPtr">AtomicPtr</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/slice/mod.rs.html#1525' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::slice::<a class="struct" href="../../std/slice/struct.IterMut.html" title="struct std::slice::IterMut">IterMut</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/core/cell.rs.html#245' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/cell/struct.Cell.html" title="struct std::cell::Cell">Cell</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/string.rs.html#2219' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Send for std::string::<a class="struct" href="../../std/string/struct.Drain.html" title="struct std::string::Drain">Drain</a>&lt;'a&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/linked_list.rs.html#1389' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::collections::linked_list::<a class="struct" href="../../std/collections/linked_list/struct.IterMut.html" title="struct std::collections::linked_list::IterMut">IterMut</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#290' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; !Send for <a class="struct" href="../../std/rc/struct.Rc.html" title="struct std::rc::Rc">Rc</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/arc.rs.html#241' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for std::sync::<a class="struct" href="../../std/sync/struct.Weak.html" title="struct std::sync::Weak">Weak</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> + <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec.rs.html#2460' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::vec::<a class="struct" href="../../std/vec/struct.Drain.html" title="struct std::vec::Drain">Drain</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/arc.rs.html#205' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/sync/struct.Arc.html" title="struct std::sync::Arc">Arc</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> + <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/linked_list.rs.html#1377' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/collections/linked_list/struct.LinkedList.html" title="struct std::collections::linked_list::LinkedList">LinkedList</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec.rs.html#2327' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Send for <a class="struct" href="../../std/vec/struct.IntoIter.html" title="struct std::vec::IntoIter">IntoIter</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#1167' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; !Send for std::rc::<a class="struct" href="../../std/rc/struct.Weak.html" title="struct std::rc::Weak">Weak</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec_deque.rs.html#2175' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::collections::vec_deque::<a class="struct" href="../../std/collections/vec_deque/struct.Drain.html" title="struct std::collections::vec_deque::Drain">Drain</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/linked_list.rs.html#1383' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Send for std::collections::linked_list::<a class="struct" href="../../std/collections/linked_list/struct.Iter.html" title="struct std::collections::linked_list::Iter">Iter</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/select.rs.html#83' title='goto source code'>[src]</a></div><code>impl !Send for <a class="struct" href="../../std/sync/mpsc/struct.Select.html" title="struct std::sync::mpsc::Select">Select</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/mod.rs.html#338' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;<a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Send for <a class="struct" href="../../std/sync/mpsc/struct.Receiver.html" title="struct std::sync::mpsc::Receiver">Receiver</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/mod.rs.html#498' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;<a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Send for <a class="struct" href="../../std/sync/mpsc/struct.Sender.html" title="struct std::sync::mpsc::Sender">Sender</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/mod.rs.html#556' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;<a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Send for <a class="struct" href="../../std/sync/mpsc/struct.SyncSender.html" title="struct std::sync::mpsc::SyncSender">SyncSender</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mutex.rs.html#135' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a> + <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Send for <a class="struct" href="../../std/sync/struct.Mutex.html" title="struct std::sync::Mutex">Mutex</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mutex.rs.html#163' title='goto source code'>[src]</a></div><code>impl&lt;'a, T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; !Send for <a class="struct" href="../../std/sync/struct.MutexGuard.html" title="struct std::sync::MutexGuard">MutexGuard</a>&lt;'a, T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/once.rs.html#104' title='goto source code'>[src]</a></div><code>impl Send for <a class="struct" href="../../std/sync/struct.Once.html" title="struct std::sync::Once">Once</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/rwlock.rs.html#84' title='goto source code'>[src]</a></div><code>impl&lt;T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a> + <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Send for <a class="struct" href="../../std/sync/struct.RwLock.html" title="struct std::sync::RwLock">RwLock</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/rwlock.rs.html#104' title='goto source code'>[src]</a></div><code>impl&lt;'a, T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; !Send for <a class="struct" href="../../std/sync/struct.RwLockReadGuard.html" title="struct std::sync::RwLockReadGuard">RwLockReadGuard</a>&lt;'a, T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/rwlock.rs.html#126' title='goto source code'>[src]</a></div><code>impl&lt;'a, T:&nbsp;?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; !Send for <a class="struct" href="../../std/sync/struct.RwLockWriteGuard.html" title="struct std::sync::RwLockWriteGuard">RwLockWriteGuard</a>&lt;'a, T&gt;</code></li>
</ul><script type="text/javascript" async
                         src="../../implementors/core/marker/trait.Send.js">
                 </script></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><kbd>?</kbd></dt>
                    <dd>Show this help dialog</dd>
                    <dt><kbd>S</kbd></dt>
                    <dd>Focus the search field</dd>
                    <dt><kbd>↑</kbd></dt>
                    <dd>Move up in search results</dd>
                    <dt><kbd>↓</kbd></dt>
                    <dd>Move down in search results</dd>
                    <dt><kbd>↹</kbd></dt>
                    <dd>Switch tab</dd>
                    <dt><kbd>&#9166;</kbd></dt>
                    <dd>Go to active search result</dd>
                    <dt><kbd>+</kbd></dt>
                    <dd>Expand all sections</dd>
                    <dt><kbd>-</kbd></dt>
                    <dd>Collapse 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>