Sophie

Sophie

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

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 `Drop` trait in crate `std`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, Drop">

    <title>std::ops::Drop - 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 Drop</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.drop">drop</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Drop">RawVec&lt;T, A&gt;</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>ops</a></p><script>window.sidebarCurrent = {name: 'Drop', 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'>ops</a>::<wbr><a class="trait" href=''>Drop</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/ops/drop.rs.html#95-117' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'><div class="docblock attributes">#[lang = "drop"]
</div>pub trait Drop {
    fn <a href='#tymethod.drop' class='fnname'>drop</a>(&amp;mut self);
}</pre><div class='docblock'><p>Used to run some code when a value goes out of scope.
This is sometimes called a 'destructor'.</p>
<p>When a value goes out of scope, it will have its <code>drop</code> method called if
its type implements <code>Drop</code>. Then, any fields the value contains will also
be dropped recursively.</p>
<p>Because of this recursive dropping, you do not need to implement this trait
unless your type needs its own destructor logic.</p>
<p>Refer to <a href="../../book/second-edition/ch15-03-drop.html">the chapter on <code>Drop</code> in <em>The Rust Programming Language</em></a>
for some more elaboration.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1><h2 id="implementing-drop" class="section-header"><a href="#implementing-drop">Implementing <code>Drop</code></a></h2>
<p>The <code>drop</code> method is called when <code>_x</code> goes out of scope, and therefore
<code>main</code> prints <code>Dropping!</code>.</p>

<pre class="rust rust-example-rendered">
<span class="kw">struct</span> <span class="ident">HasDrop</span>;

<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">HasDrop</span> {
    <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Dropping!&quot;</span>);
    }
}

<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="kw">let</span> <span class="ident">_x</span> <span class="op">=</span> <span class="ident">HasDrop</span>;
}<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Astruct%20HasDrop%3B%0A%0Aimpl%20Drop%20for%20HasDrop%20%7B%0A%20%20%20%20fn%20drop(%26mut%20self)%20%7B%0A%20%20%20%20%20%20%20%20println!(%22Dropping!%22)%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afn%20main()%20%7B%0A%20%20%20%20let%20_x%20%3D%20HasDrop%3B%0A%7D%0A">Run</a></pre>
<h2 id="dropping-is-done-recursively" class="section-header"><a href="#dropping-is-done-recursively">Dropping is done recursively</a></h2>
<p>When <code>outer</code> goes out of scope, the <code>drop</code> method will be called first for
<code>Outer</code>, then for <code>Inner</code>. Therefore, <code>main</code> prints <code>Dropping Outer!</code> and
then <code>Dropping Inner!</code>.</p>

<pre class="rust rust-example-rendered">
<span class="kw">struct</span> <span class="ident">Inner</span>;
<span class="kw">struct</span> <span class="ident">Outer</span>(<span class="ident">Inner</span>);

<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">Inner</span> {
    <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Dropping Inner!&quot;</span>);
    }
}

<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">Outer</span> {
    <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Dropping Outer!&quot;</span>);
    }
}

<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="kw">let</span> <span class="ident">_x</span> <span class="op">=</span> <span class="ident">Outer</span>(<span class="ident">Inner</span>);
}<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Astruct%20Inner%3B%0Astruct%20Outer(Inner)%3B%0A%0Aimpl%20Drop%20for%20Inner%20%7B%0A%20%20%20%20fn%20drop(%26mut%20self)%20%7B%0A%20%20%20%20%20%20%20%20println!(%22Dropping%20Inner!%22)%3B%0A%20%20%20%20%7D%0A%7D%0A%0Aimpl%20Drop%20for%20Outer%20%7B%0A%20%20%20%20fn%20drop(%26mut%20self)%20%7B%0A%20%20%20%20%20%20%20%20println!(%22Dropping%20Outer!%22)%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afn%20main()%20%7B%0A%20%20%20%20let%20_x%20%3D%20Outer(Inner)%3B%0A%7D%0A">Run</a></pre>
<h2 id="variables-are-dropped-in-reverse-order-of-declaration" class="section-header"><a href="#variables-are-dropped-in-reverse-order-of-declaration">Variables are dropped in reverse order of declaration</a></h2>
<p><code>_first</code> is declared first and <code>_second</code> is declared second, so <code>main</code> will
print <code>Declared second!</code> and then <code>Declared first!</code>.</p>

<pre class="rust rust-example-rendered">
<span class="kw">struct</span> <span class="ident">PrintOnDrop</span>(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>);

<span class="kw">impl</span> <span class="ident">Drop</span> <span class="kw">for</span> <span class="ident">PrintOnDrop</span> {
    <span class="kw">fn</span> <span class="ident">drop</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>) {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{}&quot;</span>, <span class="self">self</span>.<span class="number">0</span>);
    }
}

<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="kw">let</span> <span class="ident">_first</span> <span class="op">=</span> <span class="ident">PrintOnDrop</span>(<span class="string">&quot;Declared first!&quot;</span>);
    <span class="kw">let</span> <span class="ident">_second</span> <span class="op">=</span> <span class="ident">PrintOnDrop</span>(<span class="string">&quot;Declared second!&quot;</span>);
}<a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Astruct%20PrintOnDrop(%26'static%20str)%3B%0A%0Aimpl%20Drop%20for%20PrintOnDrop%20%7B%0A%20%20%20%20fn%20drop(%26mut%20self)%20%7B%0A%20%20%20%20%20%20%20%20println!(%22%7B%7D%22%2C%20self.0)%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afn%20main()%20%7B%0A%20%20%20%20let%20_first%20%3D%20PrintOnDrop(%22Declared%20first!%22)%3B%0A%20%20%20%20let%20_second%20%3D%20PrintOnDrop(%22Declared%20second!%22)%3B%0A%7D%0A">Run</a></pre>
</div>
            <h2 id='required-methods' class='small-section-header'>
              Required Methods<a href='#required-methods' class='anchor'></a>
            </h2>
            <div class='methods'>
        <h3 id='tymethod.drop' class='method'><span id='drop.v' class='invisible'><code>fn <a href='#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span></h3><div class='docblock'><p>Executes the destructor for this type.</p>
<p>This method is called implilcitly when the value goes out of scope,
and cannot be called explicitly (this is compiler error <a href="../../error-index.html#E0040">E0040</a>).
However, the <a href="../../std/mem/fn.drop.html"><code>std::mem::drop</code></a> function in the prelude can be
used to call the argument's <code>Drop</code> implementation.</p>
<p>When this method has been called, <code>self</code> has not yet been deallocated.
That only happens after the method is over.
If this wasn't the case, <code>self</code> would be a dangling reference.</p>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>Given that a <a href="../macro.panic.html"><code>panic!</code></a> will call <code>drop</code> as it unwinds, any <a href="../macro.panic.html"><code>panic!</code></a>
in a <code>drop</code> implementation will likely abort.</p>
</div></div>
                <h2 id='foreign-impls' class='small-section-header'>
                  Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a>
                </h2>
            <h3 id='impl-Drop' class='impl'><span class='in-band'><code>impl&lt;T, A&gt; <a class="trait" href="../../std/ops/trait.Drop.html" title="trait std::ops::Drop">Drop</a> for <a class="struct" href="../../alloc/raw_vec/struct.RawVec.html" title="struct alloc::raw_vec::RawVec">RawVec</a>&lt;T, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;A: <a class="trait" href="../../std/heap/trait.Alloc.html" title="trait std::heap::Alloc">Alloc</a>,&nbsp;</span></code><a href='#impl-Drop' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/raw_vec.rs.html#693-698' title='goto source code'>[src]</a></span></h3>
<span class='docblock autohide'><div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v-1' class='invisible'><code>fn <a href='#method.drop' class='fnname'>drop</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/alloc/raw_vec.rs.html#695-697' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Frees the memory owned by the RawVec <em>without</em> trying to Drop its contents.</p>
</div></div></span>
        <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/alloc/string.rs.html#2222-2233' title='goto source code'>[src]</a></div><code>impl&lt;'a&gt; Drop 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/vec.rs.html#2485-2503' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Drop for std::vec::<a class="struct" href="../../std/vec/struct.Drain.html" title="struct std::vec::Drain">Drain</a>&lt;'a, T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/arc.rs.html#902-973' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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.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#2123-2131' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for <a class="struct" href="../../std/vec/struct.Vec.html" title="struct std::vec::Vec">Vec</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec.rs.html#2606-2646' title='goto source code'>[src]</a></div><code>impl&lt;'a, I&gt; Drop for <a class="struct" href="../../std/vec/struct.Splice.html" title="struct std::vec::Splice">Splice</a>&lt;'a, I&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#1242-1279' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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/binary_heap.rs.html#249-255' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Drop for <a class="struct" href="../../std/collections/binary_heap/struct.PeekMut.html" title="struct std::collections::binary_heap::PeekMut">PeekMut</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/cmp/trait.Ord.html" title="trait std::cmp::Ord">Ord</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/boxed.rs.html#396-400' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for <a class="struct" href="../../std/boxed/struct.Box.html" title="struct std::boxed::Box">Box</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.rs.html#2421-2429' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for std::vec::<a class="struct" href="../../std/vec/struct.IntoIter.html" title="struct std::vec::IntoIter">IntoIter</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/linked_list.rs.html#848-852' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for <a class="struct" href="../../std/collections/linked_list/struct.LinkedList.html" title="struct std::collections::linked_list::LinkedList">LinkedList</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/rc.rs.html#807-854' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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#1124-1167' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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.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/boxed.rs.html#219-227' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for <a class="struct" href="../../std/boxed/struct.IntermediateBox.html" title="struct std::boxed::IntermediateBox">IntermediateBox</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/btree/map.rs.html#141-147' title='goto source code'>[src]</a></div><code>impl&lt;K, V&gt; Drop for <a class="struct" href="../../std/collections/btree_map/struct.BTreeMap.html" title="struct std::collections::btree_map::BTreeMap">BTreeMap</a>&lt;K, V&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/linked_list.rs.html#1075-1081' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, F&gt; Drop for std::collections::linked_list::<a class="struct" href="../../std/collections/linked_list/struct.DrainFilter.html" title="struct std::collections::linked_list::DrainFilter">DrainFilter</a>&lt;'a, T, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/ops/trait.FnMut.html" title="trait std::ops::FnMut">FnMut</a>(<a class="primitive" href="../primitive.reference.html">&amp;mut </a>T) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/btree/map.rs.html#1261-1275' title='goto source code'>[src]</a></div><code>impl&lt;K, V&gt; Drop for std::collections::btree_map::<a class="struct" href="../../std/collections/btree_map/struct.IntoIter.html" title="struct std::collections::btree_map::IntoIter">IntoIter</a>&lt;K, V&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec_deque.rs.html#2178-2222' title='goto source code'>[src]</a></div><code>impl&lt;'a, T&gt; Drop 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,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec.rs.html#2735-2745' title='goto source code'>[src]</a></div><code>impl&lt;'a, T, F&gt; Drop for std::vec::<a class="struct" href="../../std/vec/struct.DrainFilter.html" title="struct std::vec::DrainFilter">DrainFilter</a>&lt;'a, T, F&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../std/ops/trait.FnMut.html" title="trait std::ops::FnMut">FnMut</a>(<a class="primitive" href="../primitive.reference.html">&amp;mut </a>T) -&gt; <a class="primitive" href="../primitive.bool.html">bool</a>,&nbsp;</span></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/alloc/vec_deque.rs.html#76-86' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop for <a class="struct" href="../../std/collections/vec_deque/struct.VecDeque.html" title="struct std::collections::vec_deque::VecDeque">VecDeque</a>&lt;T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/collections/hash/map.rs.html#1949-1955' title='goto source code'>[src]</a></div><code>impl&lt;'a, K, V&gt; Drop for <a class="struct" href="../../std/collections/hash_map/struct.EntryPlace.html" title="struct std::collections::hash_map::EntryPlace">EntryPlace</a>&lt;'a, K, V&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/ffi/c_str.rs.html#619-624' title='goto source code'>[src]</a></div><code>impl Drop for <a class="struct" href="../../std/ffi/struct.CString.html" title="struct std::ffi::CString">CString</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/io/buffered.rs.html#583-590' title='goto source code'>[src]</a></div><code>impl&lt;W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a>&gt; Drop for <a class="struct" href="../../std/io/struct.BufWriter.html" title="struct std::io::BufWriter">BufWriter</a>&lt;W&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/select.rs.html#326-333' title='goto source code'>[src]</a></div><code>impl Drop 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/select.rs.html#335-339' title='goto source code'>[src]</a></div><code>impl&lt;'rx, T:&nbsp;<a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>&gt; Drop for <a class="struct" href="../../std/sync/mpsc/struct.Handle.html" title="struct std::sync::mpsc::Handle">Handle</a>&lt;'rx, T&gt;</code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mpsc/mod.rs.html#910-919' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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#1045-1049' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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/mpsc/mod.rs.html#1603-1612' title='goto source code'>[src]</a></div><code>impl&lt;T&gt; Drop 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/condvar.rs.html#473-477' title='goto source code'>[src]</a></div><code>impl Drop for <a class="struct" href="../../std/sync/struct.Condvar.html" title="struct std::sync::Condvar">Condvar</a></code></li>
<li><div class='out-of-band'><a class='srclink' href='../../src/std/sync/mutex.rs.html#374-383' 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>&gt; Drop 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#452-460' 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; Drop 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/rwlock.rs.html#425-430' 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>&gt; Drop 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#552-556' 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; Drop 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#559-564' 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; Drop 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/ops/drop/trait.Drop.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>