struct.NoDrop.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `NoDrop` struct in crate `nodrop`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, NoDrop">
  9. <title>nodrop::NoDrop - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../normalize.css">
  11. <link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
  12. <link rel="stylesheet" type="text/css" href="../dark.css">
  13. <link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
  14. <script src="../storage.js"></script>
  15. </head>
  16. <body class="rustdoc struct">
  17. <!--[if lte IE 8]>
  18. <div class="warning">
  19. This old browser is unsupported and will most likely display funky
  20. things.
  21. </div>
  22. <![endif]-->
  23. <nav class="sidebar">
  24. <div class="sidebar-menu">&#9776;</div>
  25. <p class='location'>Struct NoDrop</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.into_inner">into_inner</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Drop">Drop</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a></div></div><p class='location'><a href='index.html'>nodrop</a></p><script>window.sidebarCurrent = {name: 'NoDrop', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
  26. </nav>
  27. <div class="theme-picker">
  28. <button id="theme-picker" aria-label="Pick another theme!">
  29. <img src="../brush.svg" width="18" alt="Pick another theme!">
  30. </button>
  31. <div id="theme-choices"></div>
  32. </div>
  33. <script src="../theme.js"></script>
  34. <nav class="sub">
  35. <form class="search-form js-only">
  36. <div class="search-container">
  37. <input class="search-input" name="search"
  38. autocomplete="off"
  39. placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
  40. type="search">
  41. </div>
  42. </form>
  43. </nav>
  44. <section id='main' class="content">
  45. <h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>nodrop</a>::<wbr><a class="struct" href=''>NoDrop</a></span><span class='out-of-band'><span id='render-detail'>
  46. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  47. [<span class='inner'>&#x2212;</span>]
  48. </a>
  49. </span><a class='srclink' href='../src/nodrop/lib.rs.html#44' title='goto source code'>[src]</a></span></h1>
  50. <pre class='rust struct'>pub struct NoDrop&lt;T&gt;(_);</pre><div class='docblock'><p>A type holding <strong>T</strong> that will not call its destructor on drop</p>
  51. </div>
  52. <h2 id='methods' class='small-section-header'>
  53. Methods<a href='#methods' class='anchor'></a>
  54. </h2>
  55. <h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="struct" href="../nodrop/struct.NoDrop.html" title="struct nodrop::NoDrop">NoDrop</a>&lt;T&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#46-65' title='goto source code'>[src]</a></span></h3>
  56. <div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>(value: T) -&gt; <a class="struct" href="../nodrop/struct.NoDrop.html" title="struct nodrop::NoDrop">NoDrop</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#49-51' title='goto source code'>[src]</a></span></h4>
  57. <div class='docblock'><p>Create a new <strong>NoDrop</strong>.</p>
  58. </div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; T</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#57-64' title='goto source code'>[src]</a></span></h4>
  59. <div class='docblock'><p>Extract the inner value.</p>
  60. <p>Once extracted, the value can of course drop again.</p>
  61. </div></div>
  62. <h2 id='implementations' class='small-section-header'>
  63. Trait Implementations<a href='#implementations' class='anchor'></a>
  64. </h2>
  65. <h3 id='impl-Drop' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../nodrop/struct.NoDrop.html" title="struct nodrop::NoDrop">NoDrop</a>&lt;T&gt;</code><a href='#impl-Drop' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#81-90' title='goto source code'>[src]</a></span></h3>
  66. <div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#82-89' title='goto source code'>[src]</a></span></h4>
  67. <div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
  68. </div></div><h3 id='impl-Deref' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../nodrop/struct.NoDrop.html" title="struct nodrop::NoDrop">NoDrop</a>&lt;T&gt;</code><a href='#impl-Deref' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#92-103' title='goto source code'>[src]</a></span></h3>
  69. <div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = T</code></span></h4>
  70. <div class='docblock'><p>The resulting type after dereferencing.</p>
  71. </div><h4 id='method.deref' class="method"><span id='deref.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#97-102' title='goto source code'>[src]</a></span></h4>
  72. <div class='docblock'><p>Dereferences the value.</p>
  73. </div></div><h3 id='impl-DerefMut' class='impl'><span class='in-band'><code>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="../nodrop/struct.NoDrop.html" title="struct nodrop::NoDrop">NoDrop</a>&lt;T&gt;</code><a href='#impl-DerefMut' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#105-114' title='goto source code'>[src]</a></span></h3>
  74. <div class='impl-items'><h4 id='method.deref_mut' class="method"><span id='deref_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/nodrop/lib.rs.html#108-113' title='goto source code'>[src]</a></span></h4>
  75. <div class='docblock'><p>Mutably dereferences the value.</p>
  76. </div></div></section>
  77. <section id='search' class="content hidden"></section>
  78. <section class="footer"></section>
  79. <aside id="help" class="hidden">
  80. <div>
  81. <h1 class="hidden">Help</h1>
  82. <div class="shortcuts">
  83. <h2>Keyboard Shortcuts</h2>
  84. <dl>
  85. <dt><kbd>?</kbd></dt>
  86. <dd>Show this help dialog</dd>
  87. <dt><kbd>S</kbd></dt>
  88. <dd>Focus the search field</dd>
  89. <dt><kbd>↑</kbd></dt>
  90. <dd>Move up in search results</dd>
  91. <dt><kbd>↓</kbd></dt>
  92. <dd>Move down in search results</dd>
  93. <dt><kbd>↹</kbd></dt>
  94. <dd>Switch tab</dd>
  95. <dt><kbd>&#9166;</kbd></dt>
  96. <dd>Go to active search result</dd>
  97. <dt><kbd>+</kbd></dt>
  98. <dd>Expand all sections</dd>
  99. <dt><kbd>-</kbd></dt>
  100. <dd>Collapse all sections</dd>
  101. </dl>
  102. </div>
  103. <div class="infos">
  104. <h2>Search Tricks</h2>
  105. <p>
  106. Prefix searches with a type followed by a colon (e.g.
  107. <code>fn:</code>) to restrict the search to a given type.
  108. </p>
  109. <p>
  110. Accepted types are: <code>fn</code>, <code>mod</code>,
  111. <code>struct</code>, <code>enum</code>,
  112. <code>trait</code>, <code>type</code>, <code>macro</code>,
  113. and <code>const</code>.
  114. </p>
  115. <p>
  116. Search functions by type signature (e.g.
  117. <code>vec -> usize</code> or <code>* -> vec</code>)
  118. </p>
  119. </div>
  120. </div>
  121. </aside>
  122. <script>
  123. window.rootPath = "../";
  124. window.currentCrate = "nodrop";
  125. </script>
  126. <script src="../main.js"></script>
  127. <script defer src="../search-index.js"></script>
  128. </body>
  129. </html>