This commit is contained in:
2020-01-23 23:13:36 -08:00
parent dcc0df955e
commit 2bc9ebdc6b
31829 changed files with 1229378 additions and 17 deletions

3
doc/parking_lot/all.html Normal file
View File

@@ -0,0 +1,3 @@
<!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="List of all items in this crate"><meta name="keywords" content="rust, rustlang, rust-lang"><title>List of all items in this crate</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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a></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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span>
</span>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='struct.Condvar.html'>Condvar</a></li><li><a href='struct.Once.html'>Once</a></li><li><a href='struct.RawMutex.html'>RawMutex</a></li><li><a href='struct.RawRwLock.html'>RawRwLock</a></li><li><a href='struct.RawThreadId.html'>RawThreadId</a></li><li><a href='struct.WaitTimeoutResult.html'>WaitTimeoutResult</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='enum.OnceState.html'>OnceState</a></li></ul><h3 id='Typedefs'>Typedefs</h3><ul class='typedefs docblock'><li><a href='type.MappedMutexGuard.html'>MappedMutexGuard</a></li><li><a href='type.MappedReentrantMutexGuard.html'>MappedReentrantMutexGuard</a></li><li><a href='type.MappedRwLockReadGuard.html'>MappedRwLockReadGuard</a></li><li><a href='type.MappedRwLockWriteGuard.html'>MappedRwLockWriteGuard</a></li><li><a href='type.Mutex.html'>Mutex</a></li><li><a href='type.MutexGuard.html'>MutexGuard</a></li><li><a href='type.ReentrantMutex.html'>ReentrantMutex</a></li><li><a href='type.ReentrantMutexGuard.html'>ReentrantMutexGuard</a></li><li><a href='type.RwLock.html'>RwLock</a></li><li><a href='type.RwLockReadGuard.html'>RwLockReadGuard</a></li><li><a href='type.RwLockUpgradableReadGuard.html'>RwLockUpgradableReadGuard</a></li><li><a href='type.RwLockWriteGuard.html'>RwLockWriteGuard</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='constant.ONCE_INIT.html'>ONCE_INIT</a></li></ul></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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.Condvar.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.Condvar.html">../../parking_lot/struct.Condvar.html</a>...</p>
<script>location.replace("../../parking_lot/struct.Condvar.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.WaitTimeoutResult.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.WaitTimeoutResult.html">../../parking_lot/struct.WaitTimeoutResult.html</a>...</p>
<script>location.replace("../../parking_lot/struct.WaitTimeoutResult.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,2 @@
<!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 `ONCE_INIT` constant in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, ONCE_INIT"><title>parking_lot::ONCE_INIT - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'ONCE_INIT', ty: 'constant', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/once.rs.html#95' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='index.html'>parking_lot</a>::<wbr><a class="constant" href=''>ONCE_INIT</a></span></h1><pre class='rust const'>pub const ONCE_INIT: <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></pre><div class='docblock'><p>Initialization value for static <code>Once</code> values.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,37 @@
<!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 `OnceState` enum in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, OnceState"><title>parking_lot::OnceState - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum OnceState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.New">New</a><a href="#variant.Poisoned">Poisoned</a><a href="#variant.InProgress">InProgress</a><a href="#variant.Done">Done</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.done">done</a><a href="#method.poisoned">poisoned</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3COnceState%3E">PartialEq&lt;OnceState&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'OnceState', ty: 'enum', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/once.rs.html#31-43' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>parking_lot</a>::<wbr><a class="enum" href=''>OnceState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum OnceState {
New,
Poisoned,
InProgress,
Done,
}</pre></div><div class='docblock'><p>Current state of a <code>Once</code>.</p>
</div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.New" class="variant small-section-header"><a href="#variant.New" class="anchor field"></a><code id='New.v'>New</code></div><div class='docblock'><p>A closure has not been executed yet</p>
</div><div id="variant.Poisoned" class="variant small-section-header"><a href="#variant.Poisoned" class="anchor field"></a><code id='Poisoned.v'>Poisoned</code></div><div class='docblock'><p>A closure was executed but panicked.</p>
</div><div id="variant.InProgress" class="variant small-section-header"><a href="#variant.InProgress" class="anchor field"></a><code id='InProgress.v'>InProgress</code></div><div class='docblock'><p>A thread is currently executing a closure.</p>
</div><div id="variant.Done" class="variant small-section-header"><a href="#variant.Done" class="anchor field"></a><code id='Done.v'>Done</code></div><div class='docblock'><p>A closure has completed successfully.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#45-67' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.poisoned' class="method"><code id='poisoned.v'>pub fn <a href='#method.poisoned' class='fnname'>poisoned</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#51-56' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns whether the associated <code>Once</code> has been poisoned.</p>
<p>Once an initialization routine for a <code>Once</code> has panicked it will forever
indicate to future forced initialization routines that it is poisoned.</p>
</div><h4 id='method.done' class="method"><code id='done.v'>pub fn <a href='#method.done' class='fnname'>done</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#61-66' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns whether the associated <code>Once</code> has successfully executed a
closure.</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3COnceState%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a>&gt; for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-PartialEq%3COnceState%3E' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code id='ne.v'><span class="docblock attributes">#[must_use]
</span>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#208' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#30' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,40 @@
<!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 `parking_lot` crate."><meta name="keywords" content="rust, rustlang, rust-lang, parking_lot"><title>parking_lot - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate parking_lot</p><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all parking_lot's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'parking_lot', ty: 'mod', relpath: '../'};</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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/lib.rs.html#8-45' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>parking_lot</a></span></h1><div class='docblock'><p>This library provides implementations of <code>Mutex</code>, <code>RwLock</code>, <code>Condvar</code> and
<code>Once</code> that are smaller, faster and more flexible than those in the Rust
standard library. It also provides a <code>ReentrantMutex</code> type.</p>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Condvar.html" title='parking_lot::Condvar struct'>Condvar</a></td><td class='docblock-short'><p>A Condition Variable</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Once.html" title='parking_lot::Once struct'>Once</a></td><td class='docblock-short'><p>A synchronization primitive which can be used to run a one-time
initialization. Useful for one-time initialization for globals, FFI or
related functionality.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.RawMutex.html" title='parking_lot::RawMutex struct'>RawMutex</a></td><td class='docblock-short'><p>Raw mutex type backed by the parking lot.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.RawRwLock.html" title='parking_lot::RawRwLock struct'>RawRwLock</a></td><td class='docblock-short'><p>Raw reader-writer lock type backed by the parking lot.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.RawThreadId.html" title='parking_lot::RawThreadId struct'>RawThreadId</a></td><td class='docblock-short'><p>Implementation of the <code>GetThreadId</code> trait for <code>lock_api::ReentrantMutex</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.WaitTimeoutResult.html" title='parking_lot::WaitTimeoutResult struct'>WaitTimeoutResult</a></td><td class='docblock-short'><p>A type indicating whether a timed wait on a condition variable returned
due to a time out or not.</p>
</td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.OnceState.html" title='parking_lot::OnceState enum'>OnceState</a></td><td class='docblock-short'><p>Current state of a <code>Once</code>.</p>
</td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.ONCE_INIT.html" title='parking_lot::ONCE_INIT constant'>ONCE_INIT</a></td><td class='docblock-short'><p>Initialization value for static <code>Once</code> values.</p>
</td></tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
<table><tr class='module-item'><td><a class="type" href="type.MappedMutexGuard.html" title='parking_lot::MappedMutexGuard type'>MappedMutexGuard</a></td><td class='docblock-short'><p>An RAII mutex guard returned by <code>MutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.MappedReentrantMutexGuard.html" title='parking_lot::MappedReentrantMutexGuard type'>MappedReentrantMutexGuard</a></td><td class='docblock-short'><p>An RAII mutex guard returned by <code>ReentrantMutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.MappedRwLockReadGuard.html" title='parking_lot::MappedRwLockReadGuard type'>MappedRwLockReadGuard</a></td><td class='docblock-short'><p>An RAII read lock guard returned by <code>RwLockReadGuard::map</code>, which can point to a
subfield of the protected data.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.MappedRwLockWriteGuard.html" title='parking_lot::MappedRwLockWriteGuard type'>MappedRwLockWriteGuard</a></td><td class='docblock-short'><p>An RAII write lock guard returned by <code>RwLockWriteGuard::map</code>, which can point to a
subfield of the protected data.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.Mutex.html" title='parking_lot::Mutex type'>Mutex</a></td><td class='docblock-short'><p>A mutual exclusion primitive useful for protecting shared data</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.MutexGuard.html" title='parking_lot::MutexGuard type'>MutexGuard</a></td><td class='docblock-short'><p>An RAII implementation of a &quot;scoped lock&quot; of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.ReentrantMutex.html" title='parking_lot::ReentrantMutex type'>ReentrantMutex</a></td><td class='docblock-short'><p>A mutex which can be recursively locked by a single thread.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.ReentrantMutexGuard.html" title='parking_lot::ReentrantMutexGuard type'>ReentrantMutexGuard</a></td><td class='docblock-short'><p>An RAII implementation of a &quot;scoped lock&quot; of a reentrant mutex. When this structure
is dropped (falls out of scope), the lock will be unlocked.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.RwLock.html" title='parking_lot::RwLock type'>RwLock</a></td><td class='docblock-short'><p>A reader-writer lock</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.RwLockReadGuard.html" title='parking_lot::RwLockReadGuard type'>RwLockReadGuard</a></td><td class='docblock-short'><p>RAII structure used to release the shared read access of a lock when
dropped.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.RwLockUpgradableReadGuard.html" title='parking_lot::RwLockUpgradableReadGuard type'>RwLockUpgradableReadGuard</a></td><td class='docblock-short'><p>RAII structure used to release the upgradable read access of a lock when
dropped.</p>
</td></tr><tr class='module-item'><td><a class="type" href="type.RwLockWriteGuard.html" title='parking_lot::RwLockWriteGuard type'>RwLockWriteGuard</a></td><td class='docblock-short'><p>RAII structure used to release the exclusive write access of a lock when
dropped.</p>
</td></tr></table></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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.MappedMutexGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedMutexGuard.html">../../parking_lot/type.MappedMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedMutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.Mutex.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.Mutex.html">../../parking_lot/type.Mutex.html</a>...</p>
<script>location.replace("../../parking_lot/type.Mutex.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.MutexGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MutexGuard.html">../../parking_lot/type.MutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/constant.ONCE_INIT.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/constant.ONCE_INIT.html">../../parking_lot/constant.ONCE_INIT.html</a>...</p>
<script>location.replace("../../parking_lot/constant.ONCE_INIT.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/enum.OnceState.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/enum.OnceState.html">../../parking_lot/enum.OnceState.html</a>...</p>
<script>location.replace("../../parking_lot/enum.OnceState.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.Once.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.Once.html">../../parking_lot/struct.Once.html</a>...</p>
<script>location.replace("../../parking_lot/struct.Once.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.RawMutex.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.RawMutex.html">../../parking_lot/struct.RawMutex.html</a>...</p>
<script>location.replace("../../parking_lot/struct.RawMutex.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.RawRwLock.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.RawRwLock.html">../../parking_lot/struct.RawRwLock.html</a>...</p>
<script>location.replace("../../parking_lot/struct.RawRwLock.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/struct.RawThreadId.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.RawThreadId.html">../../parking_lot/struct.RawThreadId.html</a>...</p>
<script>location.replace("../../parking_lot/struct.RawThreadId.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.MappedReentrantMutexGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedReentrantMutexGuard.html">../../parking_lot/type.MappedReentrantMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedReentrantMutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.ReentrantMutex.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.ReentrantMutex.html">../../parking_lot/type.ReentrantMutex.html</a>...</p>
<script>location.replace("../../parking_lot/type.ReentrantMutex.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.ReentrantMutexGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.ReentrantMutexGuard.html">../../parking_lot/type.ReentrantMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.ReentrantMutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.MappedRwLockReadGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedRwLockReadGuard.html">../../parking_lot/type.MappedRwLockReadGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedRwLockReadGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.MappedRwLockWriteGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedRwLockWriteGuard.html">../../parking_lot/type.MappedRwLockWriteGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedRwLockWriteGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.RwLock.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.RwLock.html">../../parking_lot/type.RwLock.html</a>...</p>
<script>location.replace("../../parking_lot/type.RwLock.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.RwLockReadGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.RwLockReadGuard.html">../../parking_lot/type.RwLockReadGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.RwLockReadGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.RwLockUpgradableReadGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.RwLockUpgradableReadGuard.html">../../parking_lot/type.RwLockUpgradableReadGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.RwLockUpgradableReadGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/type.RwLockWriteGuard.html">
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.RwLockWriteGuard.html">../../parking_lot/type.RwLockWriteGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.RwLockWriteGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
initSidebarItems({"constant":[["ONCE_INIT","Initialization value for static `Once` values."]],"enum":[["OnceState","Current state of a `Once`."]],"struct":[["Condvar","A Condition Variable"],["Once","A synchronization primitive which can be used to run a one-time initialization. Useful for one-time initialization for globals, FFI or related functionality."],["RawMutex","Raw mutex type backed by the parking lot."],["RawRwLock","Raw reader-writer lock type backed by the parking lot."],["RawThreadId","Implementation of the `GetThreadId` trait for `lock_api::ReentrantMutex`."],["WaitTimeoutResult","A type indicating whether a timed wait on a condition variable returned due to a time out or not."]],"type":[["MappedMutexGuard","An RAII mutex guard returned by `MutexGuard::map`, which can point to a subfield of the protected data."],["MappedReentrantMutexGuard","An RAII mutex guard returned by `ReentrantMutexGuard::map`, which can point to a subfield of the protected data."],["MappedRwLockReadGuard","An RAII read lock guard returned by `RwLockReadGuard::map`, which can point to a subfield of the protected data."],["MappedRwLockWriteGuard","An RAII write lock guard returned by `RwLockWriteGuard::map`, which can point to a subfield of the protected data."],["Mutex","A mutual exclusion primitive useful for protecting shared data"],["MutexGuard","An RAII implementation of a \"scoped lock\" of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked."],["ReentrantMutex","A mutex which can be recursively locked by a single thread."],["ReentrantMutexGuard","An RAII implementation of a \"scoped lock\" of a reentrant mutex. When this structure is dropped (falls out of scope), the lock will be unlocked."],["RwLock","A reader-writer lock"],["RwLockReadGuard","RAII structure used to release the shared read access of a lock when dropped."],["RwLockUpgradableReadGuard","RAII structure used to release the upgradable read access of a lock when dropped."],["RwLockWriteGuard","RAII structure used to release the exclusive write access of a lock when dropped."]]});

View File

@@ -0,0 +1,130 @@
<!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 `Condvar` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, Condvar"><title>parking_lot::Condvar - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Condvar</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.notify_all">notify_all</a><a href="#method.notify_one">notify_one</a><a href="#method.wait">wait</a><a href="#method.wait_for">wait_for</a><a href="#method.wait_until">wait_until</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'Condvar', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/condvar.rs.html#84-86' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>Condvar</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Condvar { /* fields omitted */ }</pre></div><div class='docblock'><p>A Condition Variable</p>
<p>Condition variables represent the ability to block a thread such that it
consumes no CPU time while waiting for an event to occur. Condition
variables are typically associated with a boolean predicate (a condition)
and a mutex. The predicate is always verified inside of the mutex before
determining that thread must block.</p>
<p>Note that this module places one additional restriction over the system
condition variables: each condvar can be used with only one mutex at a
time. Any attempt to use multiple mutexes on the same condition variable
simultaneously will result in a runtime panic. However it is possible to
switch to a different mutex if there are no threads currently waiting on
the condition variable.</p>
<h1 id="differences-from-the-standard-library-condvar" class="section-header"><a href="#differences-from-the-standard-library-condvar">Differences from the standard library <code>Condvar</code></a></h1>
<ul>
<li>No spurious wakeups: A wait will only return a non-timeout result if it
was woken up by <code>notify_one</code> or <code>notify_all</code>.</li>
<li><code>Condvar::notify_all</code> will only wake up a single thread, the rest are
requeued to wait for the <code>Mutex</code> to be unlocked by the thread that was
woken up.</li>
<li>Only requires 1 word of space, whereas the standard library boxes the
<code>Condvar</code> due to platform limitations.</li>
<li>Can be statically constructed (requires the <code>const_fn</code> nightly feature).</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
</ul>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">parking_lot</span>::{<span class="ident">Mutex</span>, <span class="ident">Condvar</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">Arc</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
<span class="kw">let</span> <span class="ident">pair</span> <span class="op">=</span> <span class="ident">Arc</span>::<span class="ident">new</span>((<span class="ident">Mutex</span>::<span class="ident">new</span>(<span class="bool-val">false</span>), <span class="ident">Condvar</span>::<span class="ident">new</span>()));
<span class="kw">let</span> <span class="ident">pair2</span> <span class="op">=</span> <span class="ident">pair</span>.<span class="ident">clone</span>();
<span class="comment">// Inside of our lock, spawn a new thread, and then wait for it to start</span>
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span><span class="op">|</span><span class="op">|</span> {
<span class="kw">let</span> <span class="kw-2">&amp;</span>(<span class="kw-2">ref</span> <span class="ident">lock</span>, <span class="kw-2">ref</span> <span class="ident">cvar</span>) <span class="op">=</span> <span class="kw-2">&amp;</span><span class="kw-2">*</span><span class="ident">pair2</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">started</span> <span class="op">=</span> <span class="ident">lock</span>.<span class="ident">lock</span>();
<span class="kw-2">*</span><span class="ident">started</span> <span class="op">=</span> <span class="bool-val">true</span>;
<span class="ident">cvar</span>.<span class="ident">notify_one</span>();
});
<span class="comment">// wait for the thread to start up</span>
<span class="kw">let</span> <span class="kw-2">&amp;</span>(<span class="kw-2">ref</span> <span class="ident">lock</span>, <span class="kw-2">ref</span> <span class="ident">cvar</span>) <span class="op">=</span> <span class="kw-2">&amp;</span><span class="kw-2">*</span><span class="ident">pair</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">started</span> <span class="op">=</span> <span class="ident">lock</span>.<span class="ident">lock</span>();
<span class="kw">while</span> <span class="op">!</span><span class="kw-2">*</span><span class="ident">started</span> {
<span class="ident">cvar</span>.<span class="ident">wait</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">started</span>);
}</pre></div>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#88-406' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#103-107' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new condition variable which is ready to be waited on and
notified.</p>
</div><h4 id='method.notify_one' class="method"><code id='notify_one.v'>pub fn <a href='#method.notify_one' class='fnname'>notify_one</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#133-141' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wakes up one blocked thread on this condvar.</p>
<p>Returns whether a thread was woken up.</p>
<p>If there is a blocked thread on this condition variable, then it will
be woken up from its call to <code>wait</code> or <code>wait_timeout</code>. Calls to
<code>notify_one</code> are not buffered in any way.</p>
<p>To wake up all threads, see <code>notify_all()</code>.</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">parking_lot</span>::<span class="ident">Condvar</span>;
<span class="kw">let</span> <span class="ident">condvar</span> <span class="op">=</span> <span class="ident">Condvar</span>::<span class="ident">new</span>();
<span class="comment">// do something with condvar, share it with other threads</span>
<span class="kw">if</span> <span class="op">!</span><span class="ident">condvar</span>.<span class="ident">notify_one</span>() {
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Nobody was listening for this.&quot;</span>);
}</pre></div>
</div><h4 id='method.notify_all' class="method"><code id='notify_all.v'>pub fn <a href='#method.notify_all' class='fnname'>notify_all</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#195-203' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wakes up all blocked threads on this condvar.</p>
<p>Returns the number of threads woken up.</p>
<p>This method will ensure that any current waiters on the condition
variable are awoken. Calls to <code>notify_all()</code> are not buffered in any
way.</p>
<p>To wake up only one thread, see <code>notify_one()</code>.</p>
</div><h4 id='method.wait' class="method"><code id='wait.v'>pub fn <a href='#method.wait' class='fnname'>wait</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(&amp;self, mutex_guard: &amp;mut <a class="type" href="../parking_lot/type.MutexGuard.html" title="type parking_lot::MutexGuard">MutexGuard</a>&lt;T&gt;)</code><a class='srclink' href='../src/parking_lot/condvar.rs.html#266-268' title='goto source code'>[src]</a></h4><div class='docblock'><p>Blocks the current thread until this condition variable receives a
notification.</p>
<p>This function will atomically unlock the mutex specified (represented by
<code>mutex_guard</code>) and block the current thread. This means that any calls
to <code>notify_*()</code> which happen logically after the mutex is unlocked are
candidates to wake this thread up. When this function call returns, the
lock specified will have been re-acquired.</p>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>This function will panic if another thread is waiting on the <code>Condvar</code>
with a different <code>Mutex</code> object.</p>
</div><h4 id='method.wait_until' class="method"><code id='wait_until.v'>pub fn <a href='#method.wait_until' class='fnname'>wait_until</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;mutex_guard: &amp;mut <a class="type" href="../parking_lot/type.MutexGuard.html" title="type parking_lot::MutexGuard">MutexGuard</a>&lt;T&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a><br>) -&gt; <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#294-303' title='goto source code'>[src]</a></h4><div class='docblock'><p>Waits on this condition variable for a notification, timing out after
the specified time instant.</p>
<p>The semantics of this function are equivalent to <code>wait()</code> except that
the thread will be blocked roughly until <code>timeout</code> is reached. This
method should not be used for precise timing due to anomalies such as
preemption or platform differences that may not cause the maximum
amount of time waited to be precisely <code>timeout</code>.</p>
<p>Note that the best effort is made to ensure that the time waited is
measured with a monotonic clock, and not affected by the changes made to
the system time.</p>
<p>The returned <code>WaitTimeoutResult</code> value indicates if the timeout is
known to have elapsed.</p>
<p>Like <code>wait</code>, the lock specified will be re-acquired when this function
returns, regardless of whether the timeout elapsed or not.</p>
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
<p>This function will panic if another thread is waiting on the <code>Condvar</code>
with a different <code>Mutex</code> object.</p>
</div><h4 id='method.wait_for' class="method"><code id='wait_for.v'>pub fn <a href='#method.wait_for' class='fnname'>wait_for</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;mutex_guard: &amp;mut <a class="type" href="../parking_lot/type.MutexGuard.html" title="type parking_lot::MutexGuard">MutexGuard</a>&lt;T&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a><br>) -&gt; <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#398-405' title='goto source code'>[src]</a></h4><div class='docblock'><p>Waits on this condition variable for a notification, timing out after a
specified duration.</p>
<p>The semantics of this function are equivalent to <code>wait()</code> except that
the thread will be blocked for roughly no longer than <code>timeout</code>. This
method should not be used for precise timing due to anomalies such as
preemption or platform differences that may not cause the maximum
amount of time waited to be precisely <code>timeout</code>.</p>
<p>Note that the best effort is made to ensure that the time waited is
measured with a monotonic clock, and not affected by the changes made to
the system time.</p>
<p>The returned <code>WaitTimeoutResult</code> value indicates if the timeout is
known to have elapsed.</p>
<p>Like <code>wait</code>, the lock specified will be re-acquired when this function
returns, regardless of whether the timeout elapsed or not.</p>
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
<p>Panics if the given <code>timeout</code> is so large that it can't be added to the current time.
This panic is not possible if the crate is built with the <code>nightly</code> feature, then a too
large <code>timeout</code> becomes equivalent to just calling <code>wait</code>.</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#408-413' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#410-412' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#415-419' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#416-418' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,82 @@
<!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 `Once` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, Once"><title>parking_lot::Once - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Once</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.call_once">call_once</a><a href="#method.call_once_force">call_once_force</a><a href="#method.new">new</a><a href="#method.state">state</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Default">Default</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'Once', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/once.rs.html#92' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>Once</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Once(_);</pre></div><div class='docblock'><p>A synchronization primitive which can be used to run a one-time
initialization. Useful for one-time initialization for globals, FFI or
related functionality.</p>
<h1 id="differences-from-the-standard-library-once" class="section-header"><a href="#differences-from-the-standard-library-once">Differences from the standard library <code>Once</code></a></h1>
<ul>
<li>Only requires 1 byte of space, instead of 1 word.</li>
<li>Not required to be <code>'static</code>.</li>
<li>Relaxed memory barriers in the fast path, which can significantly improve
performance on some architectures.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
</ul>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">parking_lot</span>::{<span class="ident">Once</span>, <span class="ident">ONCE_INIT</span>};
<span class="kw">static</span> <span class="ident">START</span>: <span class="ident">Once</span> <span class="op">=</span> <span class="ident">ONCE_INIT</span>;
<span class="ident">START</span>.<span class="ident">call_once</span>(<span class="op">|</span><span class="op">|</span> {
<span class="comment">// run initialization here</span>
});</pre></div>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#97-337' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#108-110' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>Once</code> value.</p>
</div><h4 id='method.state' class="method"><code id='state.v'>pub fn <a href='#method.state' class='fnname'>state</a>(&amp;self) -&gt; <a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#114-125' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the current state of this <code>Once</code>.</p>
</div><h4 id='method.call_once' class="method"><code id='call_once.v'>pub fn <a href='#method.call_once' class='fnname'>call_once</a>&lt;F&gt;(&amp;self, f: F) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(),&nbsp;</span></code><a class='srclink' href='../src/parking_lot/once.rs.html#177-187' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs an initialization routine once and only once. The given closure
will be executed if this is the first time <code>call_once</code> has been called,
and otherwise the routine will <em>not</em> be invoked.</p>
<p>This method will block the calling thread if another initialization
routine is currently running.</p>
<p>When this function returns, it is guaranteed that some initialization
has run and completed (it may not be the closure specified). It is also
guaranteed that any memory writes performed by the executed closure can
be reliably observed by other threads at this point (there is a
happens-before relation between the closure and code executing after the
return).</p>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">parking_lot</span>::{<span class="ident">Once</span>, <span class="ident">ONCE_INIT</span>};
<span class="kw">static</span> <span class="kw-2">mut</span> <span class="ident">VAL</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">static</span> <span class="ident">INIT</span>: <span class="ident">Once</span> <span class="op">=</span> <span class="ident">ONCE_INIT</span>;
<span class="comment">// Accessing a `static mut` is unsafe much of the time, but if we do so</span>
<span class="comment">// in a synchronized fashion (e.g. write once or read all) then we&#39;re</span>
<span class="comment">// good to go!</span>
<span class="comment">//</span>
<span class="comment">// This function will only call `expensive_computation` once, and will</span>
<span class="comment">// otherwise always return the value returned from the first invocation.</span>
<span class="kw">fn</span> <span class="ident">get_cached_val</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">usize</span> {
<span class="kw">unsafe</span> {
<span class="ident">INIT</span>.<span class="ident">call_once</span>(<span class="op">|</span><span class="op">|</span> {
<span class="ident">VAL</span> <span class="op">=</span> <span class="ident">expensive_computation</span>();
});
<span class="ident">VAL</span>
}
}
<span class="kw">fn</span> <span class="ident">expensive_computation</span>() <span class="op">-</span><span class="op">&gt;</span> <span class="ident">usize</span> {
<span class="comment">// ...</span>
}</pre></div>
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
<p>The closure <code>f</code> will only be executed once if this is called
concurrently amongst many threads. If that closure panics, however, then
it will <em>poison</em> this <code>Once</code> instance, causing all future invocations of
<code>call_once</code> to also panic.</p>
</div><h4 id='method.call_once_force' class="method"><code id='call_once_force.v'>pub fn <a href='#method.call_once_force' class='fnname'>call_once_force</a>&lt;F&gt;(&amp;self, f: F) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="enum" href="../parking_lot/enum.OnceState.html" title="enum parking_lot::OnceState">OnceState</a>),&nbsp;</span></code><a class='srclink' href='../src/parking_lot/once.rs.html#199-211' title='goto source code'>[src]</a></h4><div class='docblock'><p>Performs the same function as <code>call_once</code> except ignores poisoning.</p>
<p>If this <code>Once</code> has been poisoned (some initialization panicked) then
this function will continue to attempt to call initialization functions
until one of them doesn't panic.</p>
<p>The closure <code>f</code> is yielded a structure which can be used to query the
state of this <code>Once</code> (whether initialization has previously panicked or
not).</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Default' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-Default' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#339-344' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.default' class="method hidden"><code id='default.v'>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#341-343' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/parking_lot/once.rs.html#346-352' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/parking_lot/once.rs.html#347-351' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.Once.html" title="struct parking_lot::Once">Once</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,22 @@
<!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 `RawMutex` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RawMutex"><title>parking_lot::RawMutex - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct RawMutex</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-RawMutex">RawMutex</a><a href="#impl-RawMutexFair">RawMutexFair</a><a href="#impl-RawMutexTimed">RawMutexTimed</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RawMutex', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/raw_mutex.rs.html#37-39' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>RawMutex</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct RawMutex { /* fields omitted */ }</pre></div><div class='docblock'><p>Raw mutex type backed by the parking lot.</p>
</div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-RawMutex' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/mutex/trait.RawMutex.html" title="trait lock_api::mutex::RawMutex">RawMutex</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-RawMutex' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#41-94' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedconstant.INIT' class="associatedconstant hidden"><code id='INIT.v'>const <a href='../lock_api/mutex/trait.RawMutex.html#associatedconstant.INIT' class="constant"><b>INIT</b></a>: <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#42-44' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Initial value for an unlocked mutex.</p>
</div><h4 id='associatedtype.GuardMarker' class="type"><code id='GuardMarker.t'>type <a href='../lock_api/mutex/trait.RawMutex.html#associatedtype.GuardMarker' class="type">GuardMarker</a> = <a class="struct" href="../lock_api/struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></code></h4><div class='docblock'><p>Marker type which determines whether a lock guard should be <code>Send</code>. Use one of the <code>GuardSend</code> or <code>GuardNoSend</code> helper types here. <a href="../lock_api/mutex/trait.RawMutex.html#associatedtype.GuardMarker">Read more</a></p>
</div><h4 id='method.lock' class="method hidden"><code id='lock.v'>fn <a href='../lock_api/mutex/trait.RawMutex.html#tymethod.lock' class='fnname'>lock</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#49-58' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Acquires this mutex, blocking the current thread until it is able to do so.</p>
</div><h4 id='method.try_lock' class="method hidden"><code id='try_lock.v'>fn <a href='../lock_api/mutex/trait.RawMutex.html#tymethod.try_lock' class='fnname'>try_lock</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#61-80' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire this mutex without blocking.</p>
</div><h4 id='method.unlock' class="method hidden"><code id='unlock.v'>fn <a href='../lock_api/mutex/trait.RawMutex.html#tymethod.unlock' class='fnname'>unlock</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#83-93' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Unlocks this mutex.</p>
</div></div><h3 id='impl-RawMutexFair' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/mutex/trait.RawMutexFair.html" title="trait lock_api::mutex::RawMutexFair">RawMutexFair</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-RawMutexFair' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#96-116' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.unlock_fair' class="method hidden"><code id='unlock_fair.v'>fn <a href='../lock_api/mutex/trait.RawMutexFair.html#tymethod.unlock_fair' class='fnname'>unlock_fair</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#98-108' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Unlocks this mutex using a fair unlock protocol.</p>
</div><h4 id='method.bump' class="method hidden"><code id='bump.v'>fn <a href='../lock_api/mutex/trait.RawMutexFair.html#method.bump' class='fnname'>bump</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#111-115' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Temporarily yields the mutex to a waiting thread if there is one. <a href="../lock_api/mutex/trait.RawMutexFair.html#method.bump">Read more</a></p>
</div></div><h3 id='impl-RawMutexTimed' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/mutex/trait.RawMutexTimed.html" title="trait lock_api::mutex::RawMutexTimed">RawMutexTimed</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-RawMutexTimed' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#118-155' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Duration' class="type"><code id='Duration.t'>type <a href='../lock_api/mutex/trait.RawMutexTimed.html#associatedtype.Duration' class="type">Duration</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></code></h4><div class='docblock'><p>Duration type used for <code>try_lock_for</code>.</p>
</div><h4 id='associatedtype.Instant' class="type"><code id='Instant.t'>type <a href='../lock_api/mutex/trait.RawMutexTimed.html#associatedtype.Instant' class="type">Instant</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a></code></h4><div class='docblock'><p>Instant type used for <code>try_lock_until</code>.</p>
</div><h4 id='method.try_lock_until' class="method hidden"><code id='try_lock_until.v'>fn <a href='../lock_api/mutex/trait.RawMutexTimed.html#tymethod.try_lock_until' class='fnname'>try_lock_until</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#123-137' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire this lock until a timeout is reached.</p>
</div><h4 id='method.try_lock_for' class="method hidden"><code id='try_lock_for.v'>fn <a href='../lock_api/mutex/trait.RawMutexTimed.html#tymethod.try_lock_for' class='fnname'>try_lock_for</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_mutex.rs.html#140-154' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire this lock until a timeout is reached.</p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,47 @@
<!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 `RawRwLock` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RawRwLock"><title>parking_lot::RawRwLock - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct RawRwLock</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-RawRwLock">RawRwLock</a><a href="#impl-RawRwLockDowngrade">RawRwLockDowngrade</a><a href="#impl-RawRwLockFair">RawRwLockFair</a><a href="#impl-RawRwLockRecursive">RawRwLockRecursive</a><a href="#impl-RawRwLockRecursiveTimed">RawRwLockRecursiveTimed</a><a href="#impl-RawRwLockTimed">RawRwLockTimed</a><a href="#impl-RawRwLockUpgrade">RawRwLockUpgrade</a><a href="#impl-RawRwLockUpgradeDowngrade">RawRwLockUpgradeDowngrade</a><a href="#impl-RawRwLockUpgradeFair">RawRwLockUpgradeFair</a><a href="#impl-RawRwLockUpgradeTimed">RawRwLockUpgradeTimed</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RawRwLock', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/raw_rwlock.rs.html#42-44' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>RawRwLock</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct RawRwLock { /* fields omitted */ }</pre></div><div class='docblock'><p>Raw reader-writer lock type backed by the parking lot.</p>
</div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-RawRwLock' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLock.html" title="trait lock_api::rwlock::RawRwLock">RawRwLock</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLock' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#46-147' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedconstant.INIT' class="associatedconstant hidden"><code id='INIT.v'>const <a href='../lock_api/rwlock/trait.RawRwLock.html#associatedconstant.INIT' class="constant"><b>INIT</b></a>: <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#47-49' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Initial value for an unlocked <code>RwLock</code>.</p>
</div><h4 id='associatedtype.GuardMarker' class="type"><code id='GuardMarker.t'>type <a href='../lock_api/rwlock/trait.RawRwLock.html#associatedtype.GuardMarker' class="type">GuardMarker</a> = <a class="struct" href="../lock_api/struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></code></h4><div class='docblock'><p>Marker type which determines whether a lock guard should be <code>Send</code>. Use one of the <code>GuardSend</code> or <code>GuardNoSend</code> helper types here. <a href="../lock_api/rwlock/trait.RawRwLock.html#associatedtype.GuardMarker">Read more</a></p>
</div><h4 id='method.lock_exclusive' class="method hidden"><code id='lock_exclusive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.lock_exclusive' class='fnname'>lock_exclusive</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#54-64' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Acquires an exclusive lock, blocking the current thread until it is able to do so.</p>
</div><h4 id='method.try_lock_exclusive' class="method hidden"><code id='try_lock_exclusive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.try_lock_exclusive' class='fnname'>try_lock_exclusive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#67-78' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an exclusive lock without blocking.</p>
</div><h4 id='method.unlock_exclusive' class="method hidden"><code id='unlock_exclusive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.unlock_exclusive' class='fnname'>unlock_exclusive</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#81-91' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases an exclusive lock.</p>
</div><h4 id='method.lock_shared' class="method hidden"><code id='lock_shared.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.lock_shared' class='fnname'>lock_shared</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#94-100' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Acquires a shared lock, blocking the current thread until it is able to do so.</p>
</div><h4 id='method.try_lock_shared' class="method hidden"><code id='try_lock_shared.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.try_lock_shared' class='fnname'>try_lock_shared</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#103-113' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock without blocking.</p>
</div><h4 id='method.unlock_shared' class="method hidden"><code id='unlock_shared.v'>fn <a href='../lock_api/rwlock/trait.RawRwLock.html#tymethod.unlock_shared' class='fnname'>unlock_shared</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#116-146' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases a shared lock.</p>
</div></div><h3 id='impl-RawRwLockFair' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockFair.html" title="trait lock_api::rwlock::RawRwLockFair">RawRwLockFair</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockFair' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#149-209' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.unlock_shared_fair' class="method hidden"><code id='unlock_shared_fair.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockFair.html#tymethod.unlock_shared_fair' class='fnname'>unlock_shared_fair</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#151-181' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases a shared lock using a fair unlock protocol.</p>
</div><h4 id='method.unlock_exclusive_fair' class="method hidden"><code id='unlock_exclusive_fair.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockFair.html#tymethod.unlock_exclusive_fair' class='fnname'>unlock_exclusive_fair</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#184-194' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases an exclusive lock using a fair unlock protocol.</p>
</div><h4 id='method.bump_shared' class="method hidden"><code id='bump_shared.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockFair.html#method.bump_shared' class='fnname'>bump_shared</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#197-201' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Temporarily yields a shared lock to a waiting thread if there is one. <a href="../lock_api/rwlock/trait.RawRwLockFair.html#method.bump_shared">Read more</a></p>
</div><h4 id='method.bump_exclusive' class="method hidden"><code id='bump_exclusive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockFair.html#method.bump_exclusive' class='fnname'>bump_exclusive</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#204-208' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Temporarily yields an exclusive lock to a waiting thread if there is one. <a href="../lock_api/rwlock/trait.RawRwLockFair.html#method.bump_exclusive">Read more</a></p>
</div></div><h3 id='impl-RawRwLockDowngrade' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockDowngrade.html" title="trait lock_api::rwlock::RawRwLockDowngrade">RawRwLockDowngrade</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockDowngrade' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#211-223' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.downgrade' class="method hidden"><code id='downgrade.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockDowngrade.html#tymethod.downgrade' class='fnname'>downgrade</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#213-222' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Atomically downgrades an exclusive lock into a shared lock without allowing any thread to take an exclusive lock in the meantime. <a href="../lock_api/rwlock/trait.RawRwLockDowngrade.html#tymethod.downgrade">Read more</a></p>
</div></div><h3 id='impl-RawRwLockTimed' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockTimed.html" title="trait lock_api::rwlock::RawRwLockTimed">RawRwLockTimed</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockTimed' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#225-288' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Duration' class="type"><code id='Duration.t'>type <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Duration' class="type">Duration</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></code></h4><div class='docblock'><p>Duration type used for <code>try_lock_for</code>.</p>
</div><h4 id='associatedtype.Instant' class="type"><code id='Instant.t'>type <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Instant' class="type">Instant</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a></code></h4><div class='docblock'><p>Instant type used for <code>try_lock_until</code>.</p>
</div><h4 id='method.try_lock_shared_for' class="method hidden"><code id='try_lock_shared_for.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#tymethod.try_lock_shared_for' class='fnname'>try_lock_shared_for</a>(&amp;self, timeout: Self::<a class="type" href="../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::rwlock::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#230-240' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock until a timeout is reached.</p>
</div><h4 id='method.try_lock_shared_until' class="method hidden"><code id='try_lock_shared_until.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#tymethod.try_lock_shared_until' class='fnname'>try_lock_shared_until</a>(&amp;self, timeout: Self::<a class="type" href="../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::rwlock::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#243-253' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock until a timeout is reached.</p>
</div><h4 id='method.try_lock_exclusive_for' class="method hidden"><code id='try_lock_exclusive_for.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#tymethod.try_lock_exclusive_for' class='fnname'>try_lock_exclusive_for</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#256-270' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an exclusive lock until a timeout is reached.</p>
</div><h4 id='method.try_lock_exclusive_until' class="method hidden"><code id='try_lock_exclusive_until.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockTimed.html#tymethod.try_lock_exclusive_until' class='fnname'>try_lock_exclusive_until</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#273-287' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an exclusive lock until a timeout is reached.</p>
</div></div><h3 id='impl-RawRwLockRecursive' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockRecursive.html" title="trait lock_api::rwlock::RawRwLockRecursive">RawRwLockRecursive</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockRecursive' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#290-312' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.lock_shared_recursive' class="method hidden"><code id='lock_shared_recursive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockRecursive.html#tymethod.lock_shared_recursive' class='fnname'>lock_shared_recursive</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#292-298' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Acquires a shared lock without deadlocking in case of a recursive lock.</p>
</div><h4 id='method.try_lock_shared_recursive' class="method hidden"><code id='try_lock_shared_recursive.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockRecursive.html#tymethod.try_lock_shared_recursive' class='fnname'>try_lock_shared_recursive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#301-311' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock without deadlocking in case of a recursive lock.</p>
</div></div><h3 id='impl-RawRwLockRecursiveTimed' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockRecursiveTimed.html" title="trait lock_api::rwlock::RawRwLockRecursiveTimed">RawRwLockRecursiveTimed</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockRecursiveTimed' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#314-340' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.try_lock_shared_recursive_for' class="method hidden"><code id='try_lock_shared_recursive_for.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockRecursiveTimed.html#tymethod.try_lock_shared_recursive_for' class='fnname'>try_lock_shared_recursive_for</a>(&amp;self, timeout: Self::<a class="type" href="../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::rwlock::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#316-326' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock until a timeout is reached, without deadlocking in case of a recursive lock. <a href="../lock_api/rwlock/trait.RawRwLockRecursiveTimed.html#tymethod.try_lock_shared_recursive_for">Read more</a></p>
</div><h4 id='method.try_lock_shared_recursive_until' class="method hidden"><code id='try_lock_shared_recursive_until.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockRecursiveTimed.html#tymethod.try_lock_shared_recursive_until' class='fnname'>try_lock_shared_recursive_until</a>(&amp;self, timeout: Self::<a class="type" href="../lock_api/rwlock/trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::rwlock::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#329-339' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire a shared lock until a timeout is reached, without deadlocking in case of a recursive lock. <a href="../lock_api/rwlock/trait.RawRwLockRecursiveTimed.html#tymethod.try_lock_shared_recursive_until">Read more</a></p>
</div></div><h3 id='impl-RawRwLockUpgrade' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockUpgrade.html" title="trait lock_api::rwlock::RawRwLockUpgrade">RawRwLockUpgrade</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockUpgrade' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#342-411' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.lock_upgradable' class="method hidden"><code id='lock_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.lock_upgradable' class='fnname'>lock_upgradable</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#344-350' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Acquires an upgradable lock, blocking the current thread until it is able to do so.</p>
</div><h4 id='method.try_lock_upgradable' class="method hidden"><code id='try_lock_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.try_lock_upgradable' class='fnname'>try_lock_upgradable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#353-363' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an upgradable lock without blocking.</p>
</div><h4 id='method.unlock_upgradable' class="method hidden"><code id='unlock_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.unlock_upgradable' class='fnname'>unlock_upgradable</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#366-376' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases an upgradable lock.</p>
</div><h4 id='method.upgrade' class="method hidden"><code id='upgrade.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.upgrade' class='fnname'>upgrade</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#379-393' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Upgrades an upgradable lock to an exclusive lock.</p>
</div><h4 id='method.try_upgrade' class="method hidden"><code id='try_upgrade.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.try_upgrade' class='fnname'>try_upgrade</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#395-410' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to upgrade an upgradable lock to an exclusive lock without blocking. <a href="../lock_api/rwlock/trait.RawRwLockUpgrade.html#tymethod.try_upgrade">Read more</a></p>
</div></div><h3 id='impl-RawRwLockUpgradeFair' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockUpgradeFair.html" title="trait lock_api::rwlock::RawRwLockUpgradeFair">RawRwLockUpgradeFair</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockUpgradeFair' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#413-433' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.unlock_upgradable_fair' class="method hidden"><code id='unlock_upgradable_fair.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeFair.html#tymethod.unlock_upgradable_fair' class='fnname'>unlock_upgradable_fair</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#415-425' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Releases an upgradable lock using a fair unlock protocol.</p>
</div><h4 id='method.bump_upgradable' class="method hidden"><code id='bump_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeFair.html#method.bump_upgradable' class='fnname'>bump_upgradable</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#428-432' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Temporarily yields an upgradable lock to a waiting thread if there is one. <a href="../lock_api/rwlock/trait.RawRwLockUpgradeFair.html#method.bump_upgradable">Read more</a></p>
</div></div><h3 id='impl-RawRwLockUpgradeDowngrade' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockUpgradeDowngrade.html" title="trait lock_api::rwlock::RawRwLockUpgradeDowngrade">RawRwLockUpgradeDowngrade</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockUpgradeDowngrade' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#435-459' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.downgrade_upgradable' class="method hidden"><code id='downgrade_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeDowngrade.html#tymethod.downgrade_upgradable' class='fnname'>downgrade_upgradable</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#437-446' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Downgrades an upgradable lock to a shared lock.</p>
</div><h4 id='method.downgrade_to_upgradable' class="method hidden"><code id='downgrade_to_upgradable.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeDowngrade.html#tymethod.downgrade_to_upgradable' class='fnname'>downgrade_to_upgradable</a>(&amp;self)</code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#449-458' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Downgrades an exclusive lock to an upgradable lock.</p>
</div></div><h3 id='impl-RawRwLockUpgradeTimed' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html" title="trait lock_api::rwlock::RawRwLockUpgradeTimed">RawRwLockUpgradeTimed</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RawRwLockUpgradeTimed' class='anchor'></a><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#461-523' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.try_lock_upgradable_until' class="method hidden"><code id='try_lock_upgradable_until.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_lock_upgradable_until' class='fnname'>try_lock_upgradable_until</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#463-473' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an upgradable lock until a timeout is reached.</p>
</div><h4 id='method.try_lock_upgradable_for' class="method hidden"><code id='try_lock_upgradable_for.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_lock_upgradable_for' class='fnname'>try_lock_upgradable_for</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#476-486' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to acquire an upgradable lock until a timeout is reached.</p>
</div><h4 id='method.try_upgrade_until' class="method hidden"><code id='try_upgrade_until.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_upgrade_until' class='fnname'>try_upgrade_until</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/struct.Instant.html" title="struct std::time::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#489-504' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to upgrade an upgradable lock to an exclusive lock until a timeout is reached. <a href="../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_upgrade_until">Read more</a></p>
</div><h4 id='method.try_upgrade_for' class="method hidden"><code id='try_upgrade_for.v'>fn <a href='../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_upgrade_for' class='fnname'>try_upgrade_for</a>(&amp;self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/raw_rwlock.rs.html#507-522' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Attempts to upgrade an upgradable lock to an exclusive lock until a timeout is reached. <a href="../lock_api/rwlock/trait.RawRwLockUpgradeTimed.html#tymethod.try_upgrade_for">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,13 @@
<!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 `RawThreadId` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RawThreadId"><title>parking_lot::RawThreadId - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct RawThreadId</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-GetThreadId">GetThreadId</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RawThreadId', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/remutex.rs.html#12' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>RawThreadId</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct RawThreadId;</pre></div><div class='docblock'><p>Implementation of the <code>GetThreadId</code> trait for <code>lock_api::ReentrantMutex</code>.</p>
</div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-GetThreadId' class='impl'><code class='in-band'>impl <a class="trait" href="../lock_api/remutex/trait.GetThreadId.html" title="trait lock_api::remutex::GetThreadId">GetThreadId</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-GetThreadId' class='anchor'></a><a class='srclink' href='../src/parking_lot/remutex.rs.html#14-23' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedconstant.INIT' class="associatedconstant hidden"><code id='INIT.v'>const <a href='../lock_api/remutex/trait.GetThreadId.html#associatedconstant.INIT' class="constant"><b>INIT</b></a>: <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a class='srclink' href='../src/parking_lot/remutex.rs.html#15' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Initial value.</p>
</div><h4 id='method.nonzero_thread_id' class="method hidden"><code id='nonzero_thread_id.v'>fn <a href='../lock_api/remutex/trait.GetThreadId.html#tymethod.nonzero_thread_id' class='fnname'>nonzero_thread_id</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../src/parking_lot/remutex.rs.html#17-22' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a non-zero thread ID which identifies the current thread of execution. <a href="../lock_api/remutex/trait.GetThreadId.html#tymethod.nonzero_thread_id">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,22 @@
<!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 `WaitTimeoutResult` struct in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, WaitTimeoutResult"><title>parking_lot::WaitTimeoutResult - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">&#9776;</div><a href='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct WaitTimeoutResult</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.timed_out">timed_out</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Copy">Copy</a><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CWaitTimeoutResult%3E">PartialEq&lt;WaitTimeoutResult&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'WaitTimeoutResult', ty: 'struct', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/condvar.rs.html#21' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>parking_lot</a>::<wbr><a class="struct" href=''>WaitTimeoutResult</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct WaitTimeoutResult(_);</pre></div><div class='docblock'><p>A type indicating whether a timed wait on a condition variable returned
due to a time out or not.</p>
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#23-29' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.timed_out' class="method"><code id='timed_out.v'>pub fn <a href='#method.timed_out' class='fnname'>timed_out</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#26-28' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns whether the wait was known to have timed out.</p>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Eq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Eq' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CWaitTimeoutResult%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a>&gt; for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-PartialEq%3CWaitTimeoutResult%3E' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code id='eq.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code id='ne.v'>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Copy' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Copy' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/parking_lot/condvar.rs.html#20' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../parking_lot/struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">WaitTimeoutResult</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&amp;self) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_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><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,7 @@
<!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 `MappedMutexGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, MappedMutexGuard"><title>parking_lot::MappedMutexGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition MappedMutexGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'MappedMutexGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/mutex.rs.html#104' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>MappedMutexGuard</a></span></h1><pre class='rust typedef'>type MappedMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MappedMutexGuard.html" title="struct lock_api::mutex::MappedMutexGuard">MappedMutexGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</pre><div class='docblock'><p>An RAII mutex guard returned by <code>MutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedMutexGuard</code> and <code>MutexGuard</code> is that the
former doesn't support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,7 @@
<!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 `MappedReentrantMutexGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, MappedReentrantMutexGuard"><title>parking_lot::MappedReentrantMutexGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition MappedReentrantMutexGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'MappedReentrantMutexGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/remutex.rs.html#52-53' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>MappedReentrantMutexGuard</a></span></h1><pre class='rust typedef'>type MappedReentrantMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/remutex/struct.MappedReentrantMutexGuard.html" title="struct lock_api::remutex::MappedReentrantMutexGuard">MappedReentrantMutexGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</pre><div class='docblock'><p>An RAII mutex guard returned by <code>ReentrantMutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedReentrantMutexGuard</code> and <code>ReentrantMutexGuard</code> is that the
former doesn't support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,7 @@
<!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 `MappedRwLockReadGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, MappedRwLockReadGuard"><title>parking_lot::MappedRwLockReadGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition MappedRwLockReadGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'MappedRwLockReadGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#106' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>MappedRwLockReadGuard</a></span></h1><pre class='rust typedef'>type MappedRwLockReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.MappedRwLockReadGuard.html" title="struct lock_api::rwlock::MappedRwLockReadGuard">MappedRwLockReadGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>An RAII read lock guard returned by <code>RwLockReadGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedRwLockReadGuard</code> and <code>RwLockReadGuard</code> is that the
former doesn't support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,7 @@
<!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 `MappedRwLockWriteGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, MappedRwLockWriteGuard"><title>parking_lot::MappedRwLockWriteGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition MappedRwLockWriteGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'MappedRwLockWriteGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#115' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>MappedRwLockWriteGuard</a></span></h1><pre class='rust typedef'>type MappedRwLockWriteGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.MappedRwLockWriteGuard.html" title="struct lock_api::rwlock::MappedRwLockWriteGuard">MappedRwLockWriteGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>An RAII write lock guard returned by <code>RwLockWriteGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedRwLockWriteGuard</code> and <code>RwLockWriteGuard</code> is that the
former doesn't support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,69 @@
<!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 `Mutex` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, Mutex"><title>parking_lot::Mutex - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition Mutex</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'Mutex', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/mutex.rs.html#88' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>Mutex</a></span></h1><pre class='rust typedef'>type Mutex&lt;T&gt; = <a class="struct" href="../lock_api/mutex/struct.Mutex.html" title="struct lock_api::mutex::Mutex">Mutex</a>&lt;<a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</pre><div class='docblock'><p>A mutual exclusion primitive useful for protecting shared data</p>
<p>This mutex will block threads waiting for the lock to become available. The
mutex can also be statically initialized or created via a <code>new</code>
constructor. Each mutex has a type parameter which represents the data that
it is protecting. The data can only be accessed through the RAII guards
returned from <code>lock</code> and <code>try_lock</code>, which guarantees that the data is only
ever accessed when the mutex is locked.</p>
<h1 id="fairness" class="section-header"><a href="#fairness">Fairness</a></h1>
<p>A typical unfair lock can often end up in a situation where a single thread
quickly acquires and releases the same mutex in succession, which can starve
other threads waiting to acquire the mutex. While this improves performance
because it doesn't force a context switch when a thread tries to re-acquire
a mutex it has just released, this can starve other threads.</p>
<p>This mutex uses <a href="https://trac.webkit.org/changeset/203350">eventual fairness</a>
to ensure that the lock will be fair on average without sacrificing
performance. This is done by forcing a fair unlock on average every 0.5ms,
which will force the lock to go to the next thread waiting for the mutex.</p>
<p>Additionally, any critical section longer than 1ms will always use a fair
unlock, which has a negligible performance impact compared to the length of
the critical section.</p>
<p>You can also force a fair unlock by calling <code>MutexGuard::unlock_fair</code> when
unlocking a mutex instead of simply dropping the <code>MutexGuard</code>.</p>
<h1 id="differences-from-the-standard-library-mutex" class="section-header"><a href="#differences-from-the-standard-library-mutex">Differences from the standard library <code>Mutex</code></a></h1>
<ul>
<li>No poisoning, the lock is released normally on panic.</li>
<li>Only requires 1 byte of space, whereas the standard library boxes the
<code>Mutex</code> due to platform limitations.</li>
<li>Can be statically constructed (requires the <code>const_fn</code> nightly feature).</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
<li>Allows raw locking &amp; unlocking without a guard.</li>
<li>Supports eventual fairness so that the mutex is fair on average.</li>
<li>Optionally allows making the mutex fair by calling <code>MutexGuard::unlock_fair</code>.</li>
</ul>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">Arc</span>;
<span class="kw">use</span> <span class="ident">parking_lot</span>::<span class="ident">Mutex</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">thread</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">sync</span>::<span class="ident">mpsc</span>::<span class="ident">channel</span>;
<span class="kw">const</span> <span class="ident">N</span>: <span class="ident">usize</span> <span class="op">=</span> <span class="number">10</span>;
<span class="comment">// Spawn a few threads to increment a shared variable (non-atomically), and</span>
<span class="comment">// let the main thread know once all increments are done.</span>
<span class="comment">//</span>
<span class="comment">// Here we&#39;re using an Arc to share memory among threads, and the data inside</span>
<span class="comment">// the Arc is protected with a mutex.</span>
<span class="kw">let</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">Arc</span>::<span class="ident">new</span>(<span class="ident">Mutex</span>::<span class="ident">new</span>(<span class="number">0</span>));
<span class="kw">let</span> (<span class="ident">tx</span>, <span class="ident">rx</span>) <span class="op">=</span> <span class="ident">channel</span>();
<span class="kw">for</span> <span class="kw">_</span> <span class="kw">in</span> <span class="number">0</span>..<span class="number">10</span> {
<span class="kw">let</span> (<span class="ident">data</span>, <span class="ident">tx</span>) <span class="op">=</span> (<span class="ident">data</span>.<span class="ident">clone</span>(), <span class="ident">tx</span>.<span class="ident">clone</span>());
<span class="ident">thread</span>::<span class="ident">spawn</span>(<span class="kw">move</span> <span class="op">|</span><span class="op">|</span> {
<span class="comment">// The shared state can only be accessed once the lock is held.</span>
<span class="comment">// Our non-atomic increment is safe because we&#39;re the only thread</span>
<span class="comment">// which can access the shared state when the lock is held.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">data</span> <span class="op">=</span> <span class="ident">data</span>.<span class="ident">lock</span>();
<span class="kw-2">*</span><span class="ident">data</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">data</span> <span class="op">=</span><span class="op">=</span> <span class="ident">N</span> {
<span class="ident">tx</span>.<span class="ident">send</span>(()).<span class="ident">unwrap</span>();
}
<span class="comment">// the lock is unlocked here when `data` goes out of scope.</span>
});
}
<span class="ident">rx</span>.<span class="ident">recv</span>().<span class="ident">unwrap</span>();</pre></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,5 @@
<!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 `MutexGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, MutexGuard"><title>parking_lot::MutexGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition MutexGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'MutexGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/mutex.rs.html#95' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>MutexGuard</a></span></h1><pre class='rust typedef'>type MutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MutexGuard.html" title="struct lock_api::mutex::MutexGuard">MutexGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</pre><div class='docblock'><p>An RAII implementation of a &quot;scoped lock&quot; of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</p>
<p>The data protected by the mutex can be accessed through this guard via its
<code>Deref</code> and <code>DerefMut</code> implementations.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,11 @@
<!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 `ReentrantMutex` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, ReentrantMutex"><title>parking_lot::ReentrantMutex - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition ReentrantMutex</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'ReentrantMutex', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/remutex.rs.html#36' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>ReentrantMutex</a></span></h1><pre class='rust typedef'>type ReentrantMutex&lt;T&gt; = <a class="struct" href="../lock_api/remutex/struct.ReentrantMutex.html" title="struct lock_api::remutex::ReentrantMutex">ReentrantMutex</a>&lt;<a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</pre><div class='docblock'><p>A mutex which can be recursively locked by a single thread.</p>
<p>This type is identical to <code>Mutex</code> except for the following points:</p>
<ul>
<li>Locking multiple times from the same thread will work correctly instead of
deadlocking.</li>
<li><code>ReentrantMutexGuard</code> does not give mutable references to the locked data.
Use a <code>RefCell</code> if you need this.</li>
</ul>
<p>See <a href="struct.Mutex.html"><code>Mutex</code></a> for more details about the underlying mutex
primitive.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,5 @@
<!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 `ReentrantMutexGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, ReentrantMutexGuard"><title>parking_lot::ReentrantMutexGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition ReentrantMutexGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'ReentrantMutexGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/remutex.rs.html#43' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>ReentrantMutexGuard</a></span></h1><pre class='rust typedef'>type ReentrantMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/remutex/struct.ReentrantMutexGuard.html" title="struct lock_api::remutex::ReentrantMutexGuard">ReentrantMutexGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="../parking_lot/struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</pre><div class='docblock'><p>An RAII implementation of a &quot;scoped lock&quot; of a reentrant mutex. When this structure
is dropped (falls out of scope), the lock will be unlocked.</p>
<p>The data protected by the mutex can be accessed through this guard via its
<code>Deref</code> implementation.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,68 @@
<!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 `RwLock` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RwLock"><title>parking_lot::RwLock - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition RwLock</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RwLock', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#89' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>RwLock</a></span></h1><pre class='rust typedef'>type RwLock&lt;T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLock.html" title="struct lock_api::rwlock::RwLock">RwLock</a>&lt;<a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>A reader-writer lock</p>
<p>This type of lock allows a number of readers or at most one writer at any
point in time. The write portion of this lock typically allows modification
of the underlying data (exclusive access) and the read portion of this lock
typically allows for read-only access (shared access).</p>
<p>This lock uses a task-fair locking policy which avoids both reader and
writer starvation. This means that readers trying to acquire the lock will
block even if the lock is unlocked when there are writers waiting to acquire
the lock. Because of this, attempts to recursively acquire a read lock
within a single thread may result in a deadlock.</p>
<p>The type parameter <code>T</code> represents the data that this lock protects. It is
required that <code>T</code> satisfies <code>Send</code> to be shared across threads and <code>Sync</code> to
allow concurrent access through readers. The RAII guards returned from the
locking methods implement <code>Deref</code> (and <code>DerefMut</code> for the <code>write</code> methods)
to allow access to the contained of the lock.</p>
<h1 id="fairness" class="section-header"><a href="#fairness">Fairness</a></h1>
<p>A typical unfair lock can often end up in a situation where a single thread
quickly acquires and releases the same lock in succession, which can starve
other threads waiting to acquire the rwlock. While this improves performance
because it doesn't force a context switch when a thread tries to re-acquire
a rwlock it has just released, this can starve other threads.</p>
<p>This rwlock uses <a href="https://trac.webkit.org/changeset/203350">eventual fairness</a>
to ensure that the lock will be fair on average without sacrificing
performance. This is done by forcing a fair unlock on average every 0.5ms,
which will force the lock to go to the next thread waiting for the rwlock.</p>
<p>Additionally, any critical section longer than 1ms will always use a fair
unlock, which has a negligible performance impact compared to the length of
the critical section.</p>
<p>You can also force a fair unlock by calling <code>RwLockReadGuard::unlock_fair</code>
or <code>RwLockWriteGuard::unlock_fair</code> when unlocking a mutex instead of simply
dropping the guard.</p>
<h1 id="differences-from-the-standard-library-rwlock" class="section-header"><a href="#differences-from-the-standard-library-rwlock">Differences from the standard library <code>RwLock</code></a></h1>
<ul>
<li>Supports atomically downgrading a write lock into a read lock.</li>
<li>Task-fair locking policy instead of an unspecified platform default.</li>
<li>No poisoning, the lock is released normally on panic.</li>
<li>Only requires 1 word of space, whereas the standard library boxes the
<code>RwLock</code> due to platform limitations.</li>
<li>Can be statically constructed (requires the <code>const_fn</code> nightly feature).</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
<li>Allows raw locking &amp; unlocking without a guard.</li>
<li>Supports eventual fairness so that the rwlock is fair on average.</li>
<li>Optionally allows making the rwlock fair by calling
<code>RwLockReadGuard::unlock_fair</code> and <code>RwLockWriteGuard::unlock_fair</code>.</li>
</ul>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">parking_lot</span>::<span class="ident">RwLock</span>;
<span class="kw">let</span> <span class="ident">lock</span> <span class="op">=</span> <span class="ident">RwLock</span>::<span class="ident">new</span>(<span class="number">5</span>);
<span class="comment">// many reader locks can be held at once</span>
{
<span class="kw">let</span> <span class="ident">r1</span> <span class="op">=</span> <span class="ident">lock</span>.<span class="ident">read</span>();
<span class="kw">let</span> <span class="ident">r2</span> <span class="op">=</span> <span class="ident">lock</span>.<span class="ident">read</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">r1</span>, <span class="number">5</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">r2</span>, <span class="number">5</span>);
} <span class="comment">// read locks are dropped at this point</span>
<span class="comment">// only one write lock may be held, however</span>
{
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">w</span> <span class="op">=</span> <span class="ident">lock</span>.<span class="ident">write</span>();
<span class="kw-2">*</span><span class="ident">w</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">w</span>, <span class="number">6</span>);
} <span class="comment">// write lock is dropped here</span></pre></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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,3 @@
<!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 `RwLockReadGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RwLockReadGuard"><title>parking_lot::RwLockReadGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition RwLockReadGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RwLockReadGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#93' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>RwLockReadGuard</a></span></h1><pre class='rust typedef'>type RwLockReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockReadGuard.html" title="struct lock_api::rwlock::RwLockReadGuard">RwLockReadGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>RAII structure used to release the shared read access of a lock when
dropped.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,3 @@
<!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 `RwLockUpgradableReadGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RwLockUpgradableReadGuard"><title>parking_lot::RwLockUpgradableReadGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition RwLockUpgradableReadGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RwLockUpgradableReadGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#119' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>RwLockUpgradableReadGuard</a></span></h1><pre class='rust typedef'>type RwLockUpgradableReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockUpgradableReadGuard.html" title="struct lock_api::rwlock::RwLockUpgradableReadGuard">RwLockUpgradableReadGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>RAII structure used to release the upgradable read access of a lock when
dropped.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -0,0 +1,3 @@
<!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 `RwLockWriteGuard` type in crate `parking_lot`."><meta name="keywords" content="rust, rustlang, rust-lang, RwLockWriteGuard"><title>parking_lot::RwLockWriteGuard - 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="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[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='../parking_lot/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Type Definition RwLockWriteGuard</p><div class="sidebar-elems"><p class='location'><a href='index.html'>parking_lot</a></p><script>window.sidebarCurrent = {name: 'RwLockWriteGuard', ty: 'type', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><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/parking_lot/rwlock.rs.html#97' title='goto source code'>[src]</a></span><span class='in-band'>Type Definition <a href='index.html'>parking_lot</a>::<wbr><a class="type" href=''>RwLockWriteGuard</a></span></h1><pre class='rust typedef'>type RwLockWriteGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockWriteGuard.html" title="struct lock_api::rwlock::RwLockWriteGuard">RwLockWriteGuard</a>&lt;'a, <a class="struct" href="../parking_lot/struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</pre><div class='docblock'><p>RAII structure used to release the exclusive write access of a lock when
dropped.</p>
</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><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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "parking_lot";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>