deploy: de38ae62916547ad097c066f94a32e9ba7790eeb

This commit is contained in:
NotAShelf 2025-02-05 00:10:33 +00:00
commit 9a86359447
28502 changed files with 1261284 additions and 0 deletions

1
lock_api/all.html Normal file
View file

@ -0,0 +1 @@
<!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"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.GuardNoSend.html">GuardNoSend</a></li><li><a href="struct.GuardSend.html">GuardSend</a></li><li><a href="struct.MappedMutexGuard.html">MappedMutexGuard</a></li><li><a href="struct.MappedReentrantMutexGuard.html">MappedReentrantMutexGuard</a></li><li><a href="struct.MappedRwLockReadGuard.html">MappedRwLockReadGuard</a></li><li><a href="struct.MappedRwLockWriteGuard.html">MappedRwLockWriteGuard</a></li><li><a href="struct.Mutex.html">Mutex</a></li><li><a href="struct.MutexGuard.html">MutexGuard</a></li><li><a href="struct.RawReentrantMutex.html">RawReentrantMutex</a></li><li><a href="struct.ReentrantMutex.html">ReentrantMutex</a></li><li><a href="struct.ReentrantMutexGuard.html">ReentrantMutexGuard</a></li><li><a href="struct.RwLock.html">RwLock</a></li><li><a href="struct.RwLockReadGuard.html">RwLockReadGuard</a></li><li><a href="struct.RwLockUpgradableReadGuard.html">RwLockUpgradableReadGuard</a></li><li><a href="struct.RwLockWriteGuard.html">RwLockWriteGuard</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="trait.GetThreadId.html">GetThreadId</a></li><li><a href="trait.RawMutex.html">RawMutex</a></li><li><a href="trait.RawMutexFair.html">RawMutexFair</a></li><li><a href="trait.RawMutexTimed.html">RawMutexTimed</a></li><li><a href="trait.RawRwLock.html">RawRwLock</a></li><li><a href="trait.RawRwLockDowngrade.html">RawRwLockDowngrade</a></li><li><a href="trait.RawRwLockFair.html">RawRwLockFair</a></li><li><a href="trait.RawRwLockRecursive.html">RawRwLockRecursive</a></li><li><a href="trait.RawRwLockRecursiveTimed.html">RawRwLockRecursiveTimed</a></li><li><a href="trait.RawRwLockTimed.html">RawRwLockTimed</a></li><li><a href="trait.RawRwLockUpgrade.html">RawRwLockUpgrade</a></li><li><a href="trait.RawRwLockUpgradeDowngrade.html">RawRwLockUpgradeDowngrade</a></li><li><a href="trait.RawRwLockUpgradeFair.html">RawRwLockUpgradeFair</a></li><li><a href="trait.RawRwLockUpgradeTimed.html">RawRwLockUpgradeTimed</a></li></ul></section></div></main></body></html>

86
lock_api/index.html Normal file
View file

@ -0,0 +1,86 @@
<!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="This library provides type-safe and fully-featured `Mutex` and `RwLock` types which wrap a simple raw mutex or rwlock type. This has several benefits: not only does it eliminate a large portion of the work in implementing custom lock types, it also allows users to write code which is generic with regards to different lock implementations."><title>lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li><li><a href="#extension-traits" title="Extension traits">Extension traits</a></li><li><a href="#cargo-features" title="Cargo features">Cargo features</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>lock_api</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/lib.rs.html#8-116">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This library provides type-safe and fully-featured <a href="struct.Mutex.html" title="struct lock_api::Mutex"><code>Mutex</code></a> and <a href="struct.RwLock.html" title="struct lock_api::RwLock"><code>RwLock</code></a>
types which wrap a simple raw mutex or rwlock type. This has several
benefits: not only does it eliminate a large portion of the work in
implementing custom lock types, it also allows users to write code which is
generic with regards to different lock implementations.</p>
<p>Basic usage of this crate is very straightforward:</p>
<ol>
<li>Create a raw lock type. This should only contain the lock state, not any
data protected by the lock.</li>
<li>Implement the <code>RawMutex</code> trait for your custom lock type.</li>
<li>Export your mutex as a type alias for <code>lock_api::Mutex</code>, and
your mutex guard as a type alias for <code>lock_api::MutexGuard</code>.
See the <a href="#example">example</a> below for details.</li>
</ol>
<p>This process is similar for <a href="struct.RwLock.html" title="struct lock_api::RwLock"><code>RwLock</code></a>s, except that two guards need to be
exported instead of one. (Or 3 guards if your type supports upgradable read
locks, see <a href="#extension-traits">extension traits</a> below for details)</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>lock_api::{RawMutex, Mutex, GuardSend};
<span class="kw">use </span>std::sync::atomic::{AtomicBool, Ordering};
<span class="comment">// 1. Define our raw lock type
</span><span class="kw">pub struct </span>RawSpinlock(AtomicBool);
<span class="comment">// 2. Implement RawMutex for this type
</span><span class="kw">unsafe impl </span>RawMutex <span class="kw">for </span>RawSpinlock {
<span class="kw">const </span>INIT: RawSpinlock = RawSpinlock(AtomicBool::new(<span class="bool-val">false</span>));
<span class="comment">// A spinlock guard can be sent to another thread and unlocked there
</span><span class="kw">type </span>GuardMarker = GuardSend;
<span class="kw">fn </span>lock(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="comment">// Note: This isn't the best way of implementing a spinlock, but it
// suffices for the sake of this example.
</span><span class="kw">while </span>!<span class="self">self</span>.try_lock() {}
}
<span class="kw">fn </span>try_lock(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
<span class="self">self</span>.<span class="number">0
</span>.compare_exchange(<span class="bool-val">false</span>, <span class="bool-val">true</span>, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
}
<span class="kw">unsafe fn </span>unlock(<span class="kw-2">&amp;</span><span class="self">self</span>) {
<span class="self">self</span>.<span class="number">0</span>.store(<span class="bool-val">false</span>, Ordering::Release);
}
}
<span class="comment">// 3. Export the wrappers. This are the types that your users will actually use.
</span><span class="kw">pub type </span>Spinlock&lt;T&gt; = lock_api::Mutex&lt;RawSpinlock, T&gt;;
<span class="kw">pub type </span>SpinlockGuard&lt;<span class="lifetime">'a</span>, T&gt; = lock_api::MutexGuard&lt;<span class="lifetime">'a</span>, RawSpinlock, T&gt;;</code></pre></div>
<h2 id="extension-traits"><a class="doc-anchor" href="#extension-traits">§</a>Extension traits</h2>
<p>In addition to basic locking &amp; unlocking functionality, you have the option
of exposing additional functionality in your lock types by implementing
additional traits for it. Examples of extension features include:</p>
<ul>
<li>Fair unlocking (<code>RawMutexFair</code>, <code>RawRwLockFair</code>)</li>
<li>Lock timeouts (<code>RawMutexTimed</code>, <code>RawRwLockTimed</code>)</li>
<li>Downgradable write locks (<code>RawRwLockDowngradable</code>)</li>
<li>Recursive read locks (<code>RawRwLockRecursive</code>)</li>
<li>Upgradable read locks (<code>RawRwLockUpgrade</code>)</li>
</ul>
<p>The <code>Mutex</code> and <code>RwLock</code> wrappers will automatically expose this additional
functionality if the raw lock type implements these extension traits.</p>
<h2 id="cargo-features"><a class="doc-anchor" href="#cargo-features">§</a>Cargo features</h2>
<p>This crate supports three cargo features:</p>
<ul>
<li><code>owning_ref</code>: Allows your lock types to be used with the <code>owning_ref</code> crate.</li>
<li><code>arc_lock</code>: Enables locking from an <code>Arc</code>. This enables types such as <code>ArcMutexGuard</code>. Note that this
requires the <code>alloc</code> crate to be present.</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">Guard<wbr>NoSend</a></div><div class="desc docblock-short">Marker type which indicates that the Guard type for a lock is not <code>Send</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">Guard<wbr>Send</a></div><div class="desc docblock-short">Marker type which indicates that the Guard type for a lock is <code>Send</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.MappedMutexGuard.html" title="struct lock_api::MappedMutexGuard">Mapped<wbr>Mutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII mutex guard returned by <code>MutexGuard::map</code>, which can point to a
subfield of the protected data.</div></li><li><div class="item-name"><a class="struct" href="struct.MappedReentrantMutexGuard.html" title="struct lock_api::MappedReentrantMutexGuard">Mapped<wbr>Reentrant<wbr>Mutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII mutex guard returned by <code>ReentrantMutexGuard::map</code>, which can point to a
subfield of the protected data.</div></li><li><div class="item-name"><a class="struct" href="struct.MappedRwLockReadGuard.html" title="struct lock_api::MappedRwLockReadGuard">Mapped<wbr>RwLock<wbr>Read<wbr>Guard</a></div><div class="desc docblock-short">An RAII read lock guard returned by <code>RwLockReadGuard::map</code>, which can point to a
subfield of the protected data.</div></li><li><div class="item-name"><a class="struct" href="struct.MappedRwLockWriteGuard.html" title="struct lock_api::MappedRwLockWriteGuard">Mapped<wbr>RwLock<wbr>Write<wbr>Guard</a></div><div class="desc docblock-short">An RAII write lock guard returned by <code>RwLockWriteGuard::map</code>, which can point to a
subfield of the protected data.</div></li><li><div class="item-name"><a class="struct" href="struct.Mutex.html" title="struct lock_api::Mutex">Mutex</a></div><div class="desc docblock-short">A mutual exclusion primitive useful for protecting shared data</div></li><li><div class="item-name"><a class="struct" href="struct.MutexGuard.html" title="struct lock_api::MutexGuard">Mutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</div></li><li><div class="item-name"><a class="struct" href="struct.RawReentrantMutex.html" title="struct lock_api::RawReentrantMutex">RawReentrant<wbr>Mutex</a></div><div class="desc docblock-short">A raw mutex type that wraps another raw mutex to provide reentrancy.</div></li><li><div class="item-name"><a class="struct" href="struct.ReentrantMutex.html" title="struct lock_api::ReentrantMutex">Reentrant<wbr>Mutex</a></div><div class="desc docblock-short">A mutex which can be recursively locked by a single thread.</div></li><li><div class="item-name"><a class="struct" href="struct.ReentrantMutexGuard.html" title="struct lock_api::ReentrantMutexGuard">Reentrant<wbr>Mutex<wbr>Guard</a></div><div class="desc docblock-short">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.</div></li><li><div class="item-name"><a class="struct" href="struct.RwLock.html" title="struct lock_api::RwLock">RwLock</a></div><div class="desc docblock-short">A reader-writer lock</div></li><li><div class="item-name"><a class="struct" href="struct.RwLockReadGuard.html" title="struct lock_api::RwLockReadGuard">RwLock<wbr>Read<wbr>Guard</a></div><div class="desc docblock-short">RAII structure used to release the shared read access of a lock when
dropped.</div></li><li><div class="item-name"><a class="struct" href="struct.RwLockUpgradableReadGuard.html" title="struct lock_api::RwLockUpgradableReadGuard">RwLock<wbr>Upgradable<wbr>Read<wbr>Guard</a></div><div class="desc docblock-short">RAII structure used to release the upgradable read access of a lock when
dropped.</div></li><li><div class="item-name"><a class="struct" href="struct.RwLockWriteGuard.html" title="struct lock_api::RwLockWriteGuard">RwLock<wbr>Write<wbr>Guard</a></div><div class="desc docblock-short">RAII structure used to release the exclusive write access of a lock when
dropped.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.GetThreadId.html" title="trait lock_api::GetThreadId">GetThread<wbr>Id</a></div><div class="desc docblock-short">Helper trait which returns a non-zero thread ID.</div></li><li><div class="item-name"><a class="trait" href="trait.RawMutex.html" title="trait lock_api::RawMutex">RawMutex</a></div><div class="desc docblock-short">Basic operations for a mutex.</div></li><li><div class="item-name"><a class="trait" href="trait.RawMutexFair.html" title="trait lock_api::RawMutexFair">RawMutex<wbr>Fair</a></div><div class="desc docblock-short">Additional methods for mutexes which support fair unlocking.</div></li><li><div class="item-name"><a class="trait" href="trait.RawMutexTimed.html" title="trait lock_api::RawMutexTimed">RawMutex<wbr>Timed</a></div><div class="desc docblock-short">Additional methods for mutexes which support locking with timeouts.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRw<wbr>Lock</a></div><div class="desc docblock-short">Basic operations for a reader-writer lock.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockDowngrade.html" title="trait lock_api::RawRwLockDowngrade">RawRw<wbr>Lock<wbr>Downgrade</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support atomically downgrading an
exclusive lock to a shared lock.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockFair.html" title="trait lock_api::RawRwLockFair">RawRw<wbr>Lock<wbr>Fair</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support fair unlocking.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockRecursive.html" title="trait lock_api::RawRwLockRecursive">RawRw<wbr>Lock<wbr>Recursive</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support recursive read locks.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockRecursiveTimed.html" title="trait lock_api::RawRwLockRecursiveTimed">RawRw<wbr>Lock<wbr>Recursive<wbr>Timed</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support recursive read locks and timeouts.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockTimed.html" title="trait lock_api::RawRwLockTimed">RawRw<wbr>Lock<wbr>Timed</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support locking with timeouts.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockUpgrade.html" title="trait lock_api::RawRwLockUpgrade">RawRw<wbr>Lock<wbr>Upgrade</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support atomically upgrading a shared
lock to an exclusive lock.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockUpgradeDowngrade.html" title="trait lock_api::RawRwLockUpgradeDowngrade">RawRw<wbr>Lock<wbr>Upgrade<wbr>Downgrade</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support upgradable locks and lock
downgrading.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockUpgradeFair.html" title="trait lock_api::RawRwLockUpgradeFair">RawRw<wbr>Lock<wbr>Upgrade<wbr>Fair</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support upgradable locks and fair
unlocking.</div></li><li><div class="item-name"><a class="trait" href="trait.RawRwLockUpgradeTimed.html" title="trait lock_api::RawRwLockUpgradeTimed">RawRw<wbr>Lock<wbr>Upgrade<wbr>Timed</a></div><div class="desc docblock-short">Additional methods for <code>RwLock</code>s which support upgradable locks and locking
with timeouts.</div></li></ul></section></div></main></body></html>

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawMutexFair.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawMutexFair.html">../../lock_api/trait.RawMutexFair.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawMutexFair.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawMutexTimed.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawMutexTimed.html">../../lock_api/trait.RawMutexTimed.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawMutexTimed.html" + location.search + location.hash);</script>
</body>
</html>

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.GetThreadId.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.GetThreadId.html">../../lock_api/trait.GetThreadId.html</a>...</p>
<script>location.replace("../../lock_api/trait.GetThreadId.html" + location.search + location.hash);</script>
</body>
</html>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockDowngrade.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockDowngrade.html">../../lock_api/trait.RawRwLockDowngrade.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockDowngrade.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockFair.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockFair.html">../../lock_api/trait.RawRwLockFair.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockFair.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockRecursive.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockRecursive.html">../../lock_api/trait.RawRwLockRecursive.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockRecursive.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockRecursiveTimed.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockRecursiveTimed.html">../../lock_api/trait.RawRwLockRecursiveTimed.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockRecursiveTimed.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockTimed.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockTimed.html">../../lock_api/trait.RawRwLockTimed.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockTimed.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockUpgrade.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockUpgrade.html">../../lock_api/trait.RawRwLockUpgrade.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockUpgrade.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockUpgradeDowngrade.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockUpgradeDowngrade.html">../../lock_api/trait.RawRwLockUpgradeDowngrade.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockUpgradeDowngrade.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockUpgradeFair.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockUpgradeFair.html">../../lock_api/trait.RawRwLockUpgradeFair.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockUpgradeFair.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../lock_api/trait.RawRwLockUpgradeTimed.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../lock_api/trait.RawRwLockUpgradeTimed.html">../../lock_api/trait.RawRwLockUpgradeTimed.html</a>...</p>
<script>location.replace("../../lock_api/trait.RawRwLockUpgradeTimed.html" + location.search + location.hash);</script>
</body>
</html>

View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["GuardNoSend","GuardSend","MappedMutexGuard","MappedReentrantMutexGuard","MappedRwLockReadGuard","MappedRwLockWriteGuard","Mutex","MutexGuard","RawReentrantMutex","ReentrantMutex","ReentrantMutexGuard","RwLock","RwLockReadGuard","RwLockUpgradableReadGuard","RwLockWriteGuard"],"trait":["GetThreadId","RawMutex","RawMutexFair","RawMutexTimed","RawRwLock","RawRwLockDowngrade","RawRwLockFair","RawRwLockRecursive","RawRwLockRecursiveTimed","RawRwLockTimed","RawRwLockUpgrade","RawRwLockUpgradeDowngrade","RawRwLockUpgradeFair","RawRwLockUpgradeTimed"]};

View file

@ -0,0 +1,12 @@
<!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="Marker type which indicates that the Guard type for a lock is not `Send`."><title>GuardNoSend in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Guard<wbr>NoSend</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Sync-for-GuardNoSend" title="Sync">Sync</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Send-for-GuardNoSend" title="!Send">!Send</a></li><li><a href="#impl-Freeze-for-GuardNoSend" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-GuardNoSend" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-GuardNoSend" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-GuardNoSend" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Struct <span class="struct">GuardNoSend</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/lib.rs.html#103">Source</a> </span></div><pre class="rust item-decl"><code>pub struct GuardNoSend(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Marker type which indicates that the Guard type for a lock is not <code>Send</code>.</p>
</div></details><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><section id="impl-Sync-for-GuardNoSend" class="impl"><a class="src rightside" href="../src/lock_api/lib.rs.html#105">Source</a><a href="#impl-Sync-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-GuardNoSend" class="impl"><a href="#impl-Freeze-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section><section id="impl-RefUnwindSafe-for-GuardNoSend" class="impl"><a href="#impl-RefUnwindSafe-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section><section id="impl-Send-for-GuardNoSend" class="impl"><a href="#impl-Send-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section><section id="impl-Unpin-for-GuardNoSend" class="impl"><a href="#impl-Unpin-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section><section id="impl-UnwindSafe-for-GuardNoSend" class="impl"><a href="#impl-UnwindSafe-for-GuardNoSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.GuardNoSend.html" title="struct lock_api::GuardNoSend">GuardNoSend</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.1/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/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.1/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/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>

View file

@ -0,0 +1,12 @@
<!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="Marker type which indicates that the Guard type for a lock is `Send`."><title>GuardSend in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Guard<wbr>Send</a></h2><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-GuardSend" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-GuardSend" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-GuardSend" title="Send">Send</a></li><li><a href="#impl-Sync-for-GuardSend" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-GuardSend" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-GuardSend" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Struct <span class="struct">GuardSend</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/lib.rs.html#100">Source</a> </span></div><pre class="rust item-decl"><code>pub struct GuardSend(<span class="comment">/* private fields */</span>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Marker type which indicates that the Guard type for a lock is <code>Send</code>.</p>
</div></details><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-GuardSend" class="impl"><a href="#impl-Freeze-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section><section id="impl-RefUnwindSafe-for-GuardSend" class="impl"><a href="#impl-RefUnwindSafe-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section><section id="impl-Send-for-GuardSend" class="impl"><a href="#impl-Send-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section><section id="impl-Sync-for-GuardSend" class="impl"><a href="#impl-Sync-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section><section id="impl-Unpin-for-GuardSend" class="impl"><a href="#impl-Unpin-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section><section id="impl-UnwindSafe-for-GuardSend" class="impl"><a href="#impl-UnwindSafe-for-GuardSend" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.GuardSend.html" title="struct lock_api::GuardSend">GuardSend</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.1/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/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.1/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.1/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/1.84.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.1/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

229
lock_api/struct.RwLock.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
<!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="Helper trait which returns a non-zero thread ID."><title>GetThreadId in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">GetThread<wbr>Id</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul><h3><a href="#required-associated-consts">Required Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.INIT" title="INIT">INIT</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.nonzero_thread_id" title="nonzero_thread_id">nonzero_thread_id</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">GetThreadId</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/remutex.rs.html#45-55">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait GetThreadId {
const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self;
// Required method
fn <a href="#tymethod.nonzero_thread_id" class="fn">nonzero_thread_id</a>(&amp;self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.84.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Helper trait which returns a non-zero thread ID.</p>
<p>The simplest way to implement this trait is to return the address of a
thread-local variable.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>Implementations of this trait must ensure that no two active threads share
the same thread ID. However the ID of a thread that has exited can be
re-used since that thread is no longer active.</p>
</div></details><h2 id="required-associated-consts" class="section-header">Required Associated Constants<a href="#required-associated-consts" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedconstant.INIT" class="method"><a class="src rightside" href="../src/lock_api/remutex.rs.html#50">Source</a><h4 class="code-header">const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self</h4></section></summary><div class="docblock"><p>Initial value.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.nonzero_thread_id" class="method"><a class="src rightside" href="../src/lock_api/remutex.rs.html#54">Source</a><h4 class="code-header">fn <a href="#tymethod.nonzero_thread_id" class="fn">nonzero_thread_id</a>(&amp;self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.84.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a></h4></section></summary><div class="docblock"><p>Returns a non-zero thread ID which identifies the current thread of
execution.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/remutex/trait.GetThreadId.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,30 @@
<!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="Basic operations for a mutex."><title>RawMutex in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawMutex</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul><h3><a href="#required-associated-consts">Required Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.INIT" title="INIT">INIT</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.GuardMarker" title="GuardMarker">GuardMarker</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.lock" title="lock">lock</a></li><li><a href="#tymethod.try_lock" title="try_lock">try_lock</a></li><li><a href="#tymethod.unlock" title="unlock">unlock</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.is_locked" title="is_locked">is_locked</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawMutex</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/mutex.rs.html#36-79">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawMutex {
type <a href="#associatedtype.GuardMarker" class="associatedtype">GuardMarker</a>;
const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self;
// Required methods
fn <a href="#tymethod.lock" class="fn">lock</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock" class="fn">try_lock</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.unlock" class="fn">unlock</a>(&amp;self);
// Provided method
fn <a href="#method.is_locked" class="fn">is_locked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Basic operations for a mutex.</p>
<p>Types implementing this trait can be used by <code>Mutex</code> to form a safe and
fully-functioning mutex type.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>Implementations of this trait must ensure that the mutex is actually
exclusive: a lock cant be acquired while the mutex is already locked.</p>
</div></details><h2 id="required-associated-consts" class="section-header">Required Associated Constants<a href="#required-associated-consts" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedconstant.INIT" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#41">Source</a><h4 class="code-header">const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self</h4></section></summary><div class="docblock"><p>Initial value for an unlocked mutex.</p>
</div></details></div><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.GuardMarker" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#45">Source</a><h4 class="code-header">type <a href="#associatedtype.GuardMarker" class="associatedtype">GuardMarker</a></h4></section></summary><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.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.lock" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#48">Source</a><h4 class="code-header">fn <a href="#tymethod.lock" class="fn">lock</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Acquires this mutex, blocking the current thread until it is able to do so.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#52">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock" class="fn">try_lock</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire this mutex without blocking. Returns <code>true</code>
if the lock was successfully acquired and <code>false</code> otherwise.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unlock" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#65">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock" class="fn">unlock</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Unlocks this mutex.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if the mutex is held in the current context, i.e. it must
be paired with a successful call to <a href="trait.RawMutex.html#tymethod.lock" title="method lock_api::RawMutex::lock"><code>lock</code></a>, <a href="trait.RawMutex.html#tymethod.try_lock" title="method lock_api::RawMutex::try_lock"><code>try_lock</code></a>, <a href="trait.RawMutexTimed.html#tymethod.try_lock_for" title="method lock_api::RawMutexTimed::try_lock_for"><code>try_lock_for</code></a> or <a href="trait.RawMutexTimed.html#tymethod.try_lock_until" title="method lock_api::RawMutexTimed::try_lock_until"><code>try_lock_until</code></a>.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.is_locked" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#69-78">Source</a><h4 class="code-header">fn <a href="#method.is_locked" class="fn">is_locked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks whether the mutex is currently locked.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/mutex/trait.RawMutex.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,23 @@
<!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="Additional methods for mutexes which support fair unlocking."><title>RawMutexFair in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawMutex<wbr>Fair</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.unlock_fair" title="unlock_fair">unlock_fair</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.bump" title="bump">bump</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawMutexFair</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/mutex.rs.html#87-110">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawMutexFair: <a class="trait" href="trait.RawMutex.html" title="trait lock_api::RawMutex">RawMutex</a> {
// Required method
unsafe fn <a href="#tymethod.unlock_fair" class="fn">unlock_fair</a>(&amp;self);
// Provided method
unsafe fn <a href="#method.bump" class="fn">bump</a>(&amp;self) { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for mutexes which support fair unlocking.</p>
<p>Fair unlocking means that a lock is handed directly over to the next waiting
thread if there is one, without giving other threads the opportunity to
“steal” the lock in the meantime. This is typically slower than unfair
unlocking, but may be necessary in certain circumstances.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_fair" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#94">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_fair" class="fn">unlock_fair</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Unlocks this mutex using a fair unlock protocol.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if the mutex is held in the current context, see
the documentation of <a href="trait.RawMutex.html#tymethod.unlock" title="method lock_api::RawMutex::unlock"><code>unlock</code></a>.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.bump" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#106-109">Source</a><h4 class="code-header">unsafe fn <a href="#method.bump" class="fn">bump</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Temporarily yields the mutex to a waiting thread if there is one.</p>
<p>This method is functionally equivalent to calling <code>unlock_fair</code> followed
by <code>lock</code>, however it can be much more efficient in the case where there
are no waiting threads.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if the mutex is held in the current context, see
the documentation of <a href="trait.RawMutex.html#tymethod.unlock" title="method lock_api::RawMutex::unlock"><code>unlock</code></a>.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/mutex/trait.RawMutexFair.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,15 @@
<!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="Additional methods for mutexes which support locking with timeouts."><title>RawMutexTimed in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawMutex<wbr>Timed</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Duration" title="Duration">Duration</a></li><li><a href="#associatedtype.Instant" title="Instant">Instant</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.try_lock_for" title="try_lock_for">try_lock_for</a></li><li><a href="#tymethod.try_lock_until" title="try_lock_until">try_lock_until</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawMutexTimed</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/mutex.rs.html#116-128">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawMutexTimed: <a class="trait" href="trait.RawMutex.html" title="trait lock_api::RawMutex">RawMutex</a> {
type <a href="#associatedtype.Duration" class="associatedtype">Duration</a>;
type <a href="#associatedtype.Instant" class="associatedtype">Instant</a>;
// Required methods
fn <a href="#tymethod.try_lock_for" class="fn">try_lock_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawMutexTimed.html#associatedtype.Duration" title="type lock_api::RawMutexTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_until" class="fn">try_lock_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawMutexTimed.html#associatedtype.Instant" title="type lock_api::RawMutexTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for mutexes which support locking with timeouts.</p>
<p>The <code>Duration</code> and <code>Instant</code> types are specified as associated types so that
this trait is usable even in <code>no_std</code> environments.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Duration" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#118">Source</a><h4 class="code-header">type <a href="#associatedtype.Duration" class="associatedtype">Duration</a></h4></section></summary><div class="docblock"><p>Duration type used for <code>try_lock_for</code>.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Instant" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#121">Source</a><h4 class="code-header">type <a href="#associatedtype.Instant" class="associatedtype">Instant</a></h4></section></summary><div class="docblock"><p>Instant type used for <code>try_lock_until</code>.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_for" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#124">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_for" class="fn">try_lock_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawMutexTimed.html#associatedtype.Duration" title="type lock_api::RawMutexTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire this lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_until" class="method"><a class="src rightside" href="../src/lock_api/mutex.rs.html#127">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_until" class="fn">try_lock_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawMutexTimed.html#associatedtype.Instant" title="type lock_api::RawMutexTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire this lock until a timeout is reached.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/mutex/trait.RawMutexTimed.js" async></script></section></div></main></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="Basic operations for a reader-writer lock."><title>RawRwLock in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul><h3><a href="#required-associated-consts">Required Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.INIT" title="INIT">INIT</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.GuardMarker" title="GuardMarker">GuardMarker</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.lock_exclusive" title="lock_exclusive">lock_exclusive</a></li><li><a href="#tymethod.lock_shared" title="lock_shared">lock_shared</a></li><li><a href="#tymethod.try_lock_exclusive" title="try_lock_exclusive">try_lock_exclusive</a></li><li><a href="#tymethod.try_lock_shared" title="try_lock_shared">try_lock_shared</a></li><li><a href="#tymethod.unlock_exclusive" title="unlock_exclusive">unlock_exclusive</a></li><li><a href="#tymethod.unlock_shared" title="unlock_shared">unlock_shared</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.is_locked" title="is_locked">is_locked</a></li><li><a href="#method.is_locked_exclusive" title="is_locked_exclusive">is_locked_exclusive</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLock</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#38-99">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLock {
type <a href="#associatedtype.GuardMarker" class="associatedtype">GuardMarker</a>;
const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self;
// Required methods
fn <a href="#tymethod.lock_shared" class="fn">lock_shared</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_shared" class="fn">try_lock_shared</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.unlock_shared" class="fn">unlock_shared</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.lock_exclusive" class="fn">lock_exclusive</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_exclusive" class="fn">try_lock_exclusive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.unlock_exclusive" class="fn">unlock_exclusive</a>(&amp;self);
// Provided methods
fn <a href="#method.is_locked" class="fn">is_locked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.is_locked_exclusive" class="fn">is_locked_exclusive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Basic operations for a reader-writer lock.</p>
<p>Types implementing this trait can be used by <code>RwLock</code> to form a safe and
fully-functioning <code>RwLock</code> type.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>Implementations of this trait must ensure that the <code>RwLock</code> is actually
exclusive: an exclusive lock cant be acquired while an exclusive or shared
lock exists, and a shared lock cant be acquire while an exclusive lock
exists.</p>
</div></details><h2 id="required-associated-consts" class="section-header">Required Associated Constants<a href="#required-associated-consts" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedconstant.INIT" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#43">Source</a><h4 class="code-header">const <a href="#associatedconstant.INIT" class="constant">INIT</a>: Self</h4></section></summary><div class="docblock"><p>Initial value for an unlocked <code>RwLock</code>.</p>
</div></details></div><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.GuardMarker" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#47">Source</a><h4 class="code-header">type <a href="#associatedtype.GuardMarker" class="associatedtype">GuardMarker</a></h4></section></summary><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.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.lock_shared" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#50">Source</a><h4 class="code-header">fn <a href="#tymethod.lock_shared" class="fn">lock_shared</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Acquires a shared lock, blocking the current thread until it is able to do so.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#53">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared" class="fn">try_lock_shared</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock without blocking.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_shared" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#60">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_shared" class="fn">unlock_shared</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases a shared lock.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if a shared lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.lock_exclusive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#63">Source</a><h4 class="code-header">fn <a href="#tymethod.lock_exclusive" class="fn">lock_exclusive</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Acquires an exclusive lock, blocking the current thread until it is able to do so.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_exclusive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#66">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_exclusive" class="fn">try_lock_exclusive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an exclusive lock without blocking.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_exclusive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#73">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_exclusive" class="fn">unlock_exclusive</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases an exclusive lock.</p>
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
<p>This method may only be called if an exclusive lock is held in the current context.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.is_locked" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#77-86">Source</a><h4 class="code-header">fn <a href="#method.is_locked" class="fn">is_locked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if this <code>RwLock</code> is currently locked in any way.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_locked_exclusive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#89-98">Source</a><h4 class="code-header">fn <a href="#method.is_locked_exclusive" class="fn">is_locked_exclusive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Check if this <code>RwLock</code> is currently exclusively locked.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLock.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,10 @@
<!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="Additional methods for `RwLock`s which support atomically downgrading an exclusive lock to a shared lock."><title>RawRwLockDowngrade in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Downgrade</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.downgrade" title="downgrade">downgrade</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockDowngrade</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#153-161">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockDowngrade: <a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRwLock</a> {
// Required method
unsafe fn <a href="#tymethod.downgrade" class="fn">downgrade</a>(&amp;self);
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support atomically downgrading an
exclusive lock to a shared lock.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.downgrade" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#160">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.downgrade" class="fn">downgrade</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Atomically downgrades an exclusive lock into a shared lock without
allowing any thread to take an exclusive lock in the meantime.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if an exclusive lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockDowngrade.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,32 @@
<!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="Additional methods for `RwLock`s which support fair unlocking."><title>RawRwLockFair in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Fair</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.unlock_exclusive_fair" title="unlock_exclusive_fair">unlock_exclusive_fair</a></li><li><a href="#tymethod.unlock_shared_fair" title="unlock_shared_fair">unlock_shared_fair</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.bump_exclusive" title="bump_exclusive">bump_exclusive</a></li><li><a href="#method.bump_shared" title="bump_shared">bump_shared</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockFair</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#107-149">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockFair: <a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRwLock</a> {
// Required methods
unsafe fn <a href="#tymethod.unlock_shared_fair" class="fn">unlock_shared_fair</a>(&amp;self);
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.unlock_exclusive_fair" class="fn">unlock_exclusive_fair</a>(&amp;self);
// Provided methods
unsafe fn <a href="#method.bump_shared" class="fn">bump_shared</a>(&amp;self) { ... }
<span class="item-spacer"></span> unsafe fn <a href="#method.bump_exclusive" class="fn">bump_exclusive</a>(&amp;self) { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support fair unlocking.</p>
<p>Fair unlocking means that a lock is handed directly over to the next waiting
thread if there is one, without giving other threads the opportunity to
“steal” the lock in the meantime. This is typically slower than unfair
unlocking, but may be necessary in certain circumstances.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_shared_fair" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#113">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_shared_fair" class="fn">unlock_shared_fair</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases a shared lock using a fair unlock protocol.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if a shared lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_exclusive_fair" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#120">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_exclusive_fair" class="fn">unlock_exclusive_fair</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases an exclusive lock using a fair unlock protocol.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if an exclusive lock is held in the current context.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.bump_shared" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#131-134">Source</a><h4 class="code-header">unsafe fn <a href="#method.bump_shared" class="fn">bump_shared</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Temporarily yields a shared lock to a waiting thread if there is one.</p>
<p>This method is functionally equivalent to calling <code>unlock_shared_fair</code> followed
by <code>lock_shared</code>, however it can be much more efficient in the case where there
are no waiting threads.</p>
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
<p>This method may only be called if a shared lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.bump_exclusive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#145-148">Source</a><h4 class="code-header">unsafe fn <a href="#method.bump_exclusive" class="fn">bump_exclusive</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Temporarily yields an exclusive lock to a waiting thread if there is one.</p>
<p>This method is functionally equivalent to calling <code>unlock_exclusive_fair</code> followed
by <code>lock_exclusive</code>, however it can be much more efficient in the case where there
are no waiting threads.</p>
<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5>
<p>This method may only be called if an exclusive lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockFair.js" async></script></section></div></main></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="Additional methods for `RwLock`s which support recursive read locks."><title>RawRwLockRecursive in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Recursive</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.lock_shared_recursive" title="lock_shared_recursive">lock_shared_recursive</a></li><li><a href="#tymethod.try_lock_shared_recursive" title="try_lock_shared_recursive">try_lock_shared_recursive</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockRecursive</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#194-200">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockRecursive: <a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRwLock</a> {
// Required methods
fn <a href="#tymethod.lock_shared_recursive" class="fn">lock_shared_recursive</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_shared_recursive" class="fn">try_lock_shared_recursive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support recursive read locks.</p>
<p>These are guaranteed to succeed without blocking if
another read lock is held at the time of the call. This allows a thread
to recursively lock a <code>RwLock</code>. However using this method can cause
writers to starve since readers no longer block if a writer is waiting
for the lock.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.lock_shared_recursive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#196">Source</a><h4 class="code-header">fn <a href="#tymethod.lock_shared_recursive" class="fn">lock_shared_recursive</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Acquires a shared lock without deadlocking in case of a recursive lock.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared_recursive" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#199">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared_recursive" class="fn">try_lock_shared_recursive</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock without deadlocking in case of a recursive lock.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockRecursive.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,10 @@
<!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="Additional methods for `RwLock`s which support recursive read locks and timeouts."><title>RawRwLockRecursiveTimed in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Recursive<wbr>Timed</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.try_lock_shared_recursive_for" title="try_lock_shared_recursive_for">try_lock_shared_recursive_for</a></li><li><a href="#tymethod.try_lock_shared_recursive_until" title="try_lock_shared_recursive_until">try_lock_shared_recursive_until</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockRecursiveTimed</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#203-211">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockRecursiveTimed: <a class="trait" href="trait.RawRwLockRecursive.html" title="trait lock_api::RawRwLockRecursive">RawRwLockRecursive</a> + <a class="trait" href="trait.RawRwLockTimed.html" title="trait lock_api::RawRwLockTimed">RawRwLockTimed</a> {
// Required methods
fn <a href="#tymethod.try_lock_shared_recursive_for" class="fn">try_lock_shared_recursive_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_shared_recursive_until" class="fn">try_lock_shared_recursive_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support recursive read locks and timeouts.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared_recursive_for" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#206">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared_recursive_for" class="fn">try_lock_shared_recursive_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock until a timeout is reached, without
deadlocking in case of a recursive lock.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared_recursive_until" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#210">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared_recursive_until" class="fn">try_lock_shared_recursive_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock until a timeout is reached, without
deadlocking in case of a recursive lock.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockRecursiveTimed.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,19 @@
<!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="Additional methods for `RwLock`s which support locking with timeouts."><title>RawRwLockTimed in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Timed</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Duration" title="Duration">Duration</a></li><li><a href="#associatedtype.Instant" title="Instant">Instant</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.try_lock_exclusive_for" title="try_lock_exclusive_for">try_lock_exclusive_for</a></li><li><a href="#tymethod.try_lock_exclusive_until" title="try_lock_exclusive_until">try_lock_exclusive_until</a></li><li><a href="#tymethod.try_lock_shared_for" title="try_lock_shared_for">try_lock_shared_for</a></li><li><a href="#tymethod.try_lock_shared_until" title="try_lock_shared_until">try_lock_shared_until</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockTimed</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#167-185">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockTimed: <a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRwLock</a> {
type <a href="#associatedtype.Duration" class="associatedtype">Duration</a>;
type <a href="#associatedtype.Instant" class="associatedtype">Instant</a>;
// Required methods
fn <a href="#tymethod.try_lock_shared_for" class="fn">try_lock_shared_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_shared_until" class="fn">try_lock_shared_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_exclusive_for" class="fn">try_lock_exclusive_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_exclusive_until" class="fn">try_lock_exclusive_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support locking with timeouts.</p>
<p>The <code>Duration</code> and <code>Instant</code> types are specified as associated types so that
this trait is usable even in <code>no_std</code> environments.</p>
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Duration" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#169">Source</a><h4 class="code-header">type <a href="#associatedtype.Duration" class="associatedtype">Duration</a></h4></section></summary><div class="docblock"><p>Duration type used for <code>try_lock_for</code>.</p>
</div></details><details class="toggle" open><summary><section id="associatedtype.Instant" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#172">Source</a><h4 class="code-header">type <a href="#associatedtype.Instant" class="associatedtype">Instant</a></h4></section></summary><div class="docblock"><p>Instant type used for <code>try_lock_until</code>.</p>
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared_for" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#175">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared_for" class="fn">try_lock_shared_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_shared_until" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#178">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_shared_until" class="fn">try_lock_shared_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire a shared lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_exclusive_for" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#181">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_exclusive_for" class="fn">try_lock_exclusive_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an exclusive lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_exclusive_until" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#184">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_exclusive_until" class="fn">try_lock_exclusive_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an exclusive lock until a timeout is reached.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockTimed.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,25 @@
<!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="Additional methods for `RwLock`s which support atomically upgrading a shared lock to an exclusive lock."><title>RawRwLockUpgrade in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Upgrade</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.lock_upgradable" title="lock_upgradable">lock_upgradable</a></li><li><a href="#tymethod.try_lock_upgradable" title="try_lock_upgradable">try_lock_upgradable</a></li><li><a href="#tymethod.try_upgrade" title="try_upgrade">try_upgrade</a></li><li><a href="#tymethod.unlock_upgradable" title="unlock_upgradable">unlock_upgradable</a></li><li><a href="#tymethod.upgrade" title="upgrade">upgrade</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockUpgrade</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#219-247">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockUpgrade: <a class="trait" href="trait.RawRwLock.html" title="trait lock_api::RawRwLock">RawRwLock</a> {
// Required methods
fn <a href="#tymethod.lock_upgradable" class="fn">lock_upgradable</a>(&amp;self);
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_upgradable" class="fn">try_lock_upgradable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.unlock_upgradable" class="fn">unlock_upgradable</a>(&amp;self);
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.upgrade" class="fn">upgrade</a>(&amp;self);
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.try_upgrade" class="fn">try_upgrade</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support atomically upgrading a shared
lock to an exclusive lock.</p>
<p>This requires acquiring a special “upgradable read lock” instead of a
normal shared lock. There may only be one upgradable lock at any time,
otherwise deadlocks could occur when upgrading.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.lock_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#221">Source</a><h4 class="code-header">fn <a href="#tymethod.lock_upgradable" class="fn">lock_upgradable</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Acquires an upgradable lock, blocking the current thread until it is able to do so.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#224">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_upgradable" class="fn">try_lock_upgradable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an upgradable lock without blocking.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#231">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_upgradable" class="fn">unlock_upgradable</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases an upgradable lock.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.upgrade" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#238">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.upgrade" class="fn">upgrade</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Upgrades an upgradable lock to an exclusive lock.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_upgrade" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#246">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.try_upgrade" class="fn">try_upgrade</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to upgrade an upgradable lock to an exclusive lock without
blocking.</p>
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockUpgrade.js" async></script></section></div></main></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="Additional methods for `RwLock`s which support upgradable locks and lock downgrading."><title>RawRwLockUpgradeDowngrade in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Upgrade<wbr>Downgrade</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.downgrade_to_upgradable" title="downgrade_to_upgradable">downgrade_to_upgradable</a></li><li><a href="#tymethod.downgrade_upgradable" title="downgrade_upgradable">downgrade_upgradable</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockUpgradeDowngrade</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#276-290">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockUpgradeDowngrade: <a class="trait" href="trait.RawRwLockUpgrade.html" title="trait lock_api::RawRwLockUpgrade">RawRwLockUpgrade</a> + <a class="trait" href="trait.RawRwLockDowngrade.html" title="trait lock_api::RawRwLockDowngrade">RawRwLockDowngrade</a> {
// Required methods
unsafe fn <a href="#tymethod.downgrade_upgradable" class="fn">downgrade_upgradable</a>(&amp;self);
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.downgrade_to_upgradable" class="fn">downgrade_to_upgradable</a>(&amp;self);
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support upgradable locks and lock
downgrading.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.downgrade_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#282">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.downgrade_upgradable" class="fn">downgrade_upgradable</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Downgrades an upgradable lock to a shared lock.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.downgrade_to_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#289">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.downgrade_to_upgradable" class="fn">downgrade_to_upgradable</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Downgrades an exclusive lock to an upgradable lock.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if an exclusive lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockUpgradeDowngrade.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,18 @@
<!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="Additional methods for `RwLock`s which support upgradable locks and fair unlocking."><title>RawRwLockUpgradeFair in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Upgrade<wbr>Fair</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.unlock_upgradable_fair" title="unlock_upgradable_fair">unlock_upgradable_fair</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.bump_upgradable" title="bump_upgradable">bump_upgradable</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockUpgradeFair</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#251-272">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockUpgradeFair: <a class="trait" href="trait.RawRwLockUpgrade.html" title="trait lock_api::RawRwLockUpgrade">RawRwLockUpgrade</a> + <a class="trait" href="trait.RawRwLockFair.html" title="trait lock_api::RawRwLockFair">RawRwLockFair</a> {
// Required method
unsafe fn <a href="#tymethod.unlock_upgradable_fair" class="fn">unlock_upgradable_fair</a>(&amp;self);
// Provided method
unsafe fn <a href="#method.bump_upgradable" class="fn">bump_upgradable</a>(&amp;self) { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support upgradable locks and fair
unlocking.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.unlock_upgradable_fair" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#257">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.unlock_upgradable_fair" class="fn">unlock_upgradable_fair</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Releases an upgradable lock using a fair unlock protocol.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.bump_upgradable" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#268-271">Source</a><h4 class="code-header">unsafe fn <a href="#method.bump_upgradable" class="fn">bump_upgradable</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Temporarily yields an upgradable lock to a waiting thread if there is one.</p>
<p>This method is functionally equivalent to calling <code>unlock_upgradable_fair</code> followed
by <code>lock_upgradable</code>, however it can be much more efficient in the case where there
are no waiting threads.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockUpgradeFair.js" async></script></section></div></main></body></html>

View file

@ -0,0 +1,19 @@
<!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="Additional methods for `RwLock`s which support upgradable locks and locking with timeouts."><title>RawRwLockUpgradeTimed in lock_api - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="lock_api" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../lock_api/index.html">lock_<wbr>api</a><span class="version">0.4.12</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawRw<wbr>Lock<wbr>Upgrade<wbr>Timed</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.try_lock_upgradable_for" title="try_lock_upgradable_for">try_lock_upgradable_for</a></li><li><a href="#tymethod.try_lock_upgradable_until" title="try_lock_upgradable_until">try_lock_upgradable_until</a></li><li><a href="#tymethod.try_upgrade_for" title="try_upgrade_for">try_upgrade_for</a></li><li><a href="#tymethod.try_upgrade_until" title="try_upgrade_until">try_upgrade_until</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate lock_<wbr>api</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">lock_api</a></span><h1>Trait <span class="trait">RawRwLockUpgradeTimed</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/lock_api/rwlock.rs.html#294-316">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait RawRwLockUpgradeTimed: <a class="trait" href="trait.RawRwLockUpgrade.html" title="trait lock_api::RawRwLockUpgrade">RawRwLockUpgrade</a> + <a class="trait" href="trait.RawRwLockTimed.html" title="trait lock_api::RawRwLockTimed">RawRwLockTimed</a> {
// Required methods
fn <a href="#tymethod.try_lock_upgradable_for" class="fn">try_lock_upgradable_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.try_lock_upgradable_until" class="fn">try_lock_upgradable_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.try_upgrade_for" class="fn">try_upgrade_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.try_upgrade_until" class="fn">try_upgrade_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Additional methods for <code>RwLock</code>s which support upgradable locks and locking
with timeouts.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_upgradable_for" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#296">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_upgradable_for" class="fn">try_lock_upgradable_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an upgradable lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_lock_upgradable_until" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#299">Source</a><h4 class="code-header">fn <a href="#tymethod.try_lock_upgradable_until" class="fn">try_lock_upgradable_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to acquire an upgradable lock until a timeout is reached.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_upgrade_for" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#307">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.try_upgrade_for" class="fn">try_upgrade_for</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Duration" title="type lock_api::RawRwLockTimed::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to upgrade an upgradable lock to an exclusive lock until a
timeout is reached.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.try_upgrade_until" class="method"><a class="src rightside" href="../src/lock_api/rwlock.rs.html#315">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.try_upgrade_until" class="fn">try_upgrade_until</a>(&amp;self, timeout: Self::<a class="associatedtype" href="trait.RawRwLockTimed.html#associatedtype.Instant" title="type lock_api::RawRwLockTimed::Instant">Instant</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Attempts to upgrade an upgradable lock to an exclusive lock until a
timeout is reached.</p>
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
<p>This method may only be called if an upgradable lock is held in the current context.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.1/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/lock_api/rwlock/trait.RawRwLockUpgradeTimed.js" async></script></section></div></main></body></html>