Files
phy/parking_lot/index.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

23 lines
14 KiB
HTML

<!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 implementations of `Mutex`, `RwLock`, `Condvar` and `Once` that are smaller, faster and more flexible than those in the Rust standard library. It also provides a `ReentrantMutex` type."><title>parking_lot - 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="parking_lot" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" 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="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.3</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="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</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>parking_lot</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/parking_lot/lib.rs.html#8-59">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 implementations of <code>Mutex</code>, <code>RwLock</code>, <code>Condvar</code> and
<code>Once</code> that are smaller, faster and more flexible than those in the Rust
standard library. It also provides a <code>ReentrantMutex</code> type.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.lock_api"><code>pub use ::<a class="mod" href="../lock_api/index.html" title="mod lock_api">lock_api</a>;</code></div></li></ul><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.ArcMutexGuard.html" title="struct parking_lot::ArcMutexGuard">ArcMutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII mutex guard returned by the <code>Arc</code> locking operations on <code>Mutex</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ArcReentrantMutexGuard.html" title="struct parking_lot::ArcReentrantMutexGuard">ArcReentrant<wbr>Mutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII mutex guard returned by the <code>Arc</code> locking operations on <code>ReentrantMutex</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ArcRwLockReadGuard.html" title="struct parking_lot::ArcRwLockReadGuard">ArcRw<wbr>Lock<wbr>Read<wbr>Guard</a></div><div class="desc docblock-short">An RAII rwlock guard returned by the <code>Arc</code> locking operations on <code>RwLock</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.ArcRwLockUpgradableReadGuard.html" title="struct parking_lot::ArcRwLockUpgradableReadGuard">ArcRw<wbr>Lock<wbr>Upgradable<wbr>Read<wbr>Guard</a></div><div class="desc docblock-short">An RAII rwlock guard returned by the <code>Arc</code> locking operations on <code>RwLock</code>.
This is similar to the <code>RwLockUpgradableReadGuard</code> struct, except instead of using a reference to unlock the
<code>RwLock</code> it uses an <code>Arc&lt;RwLock&gt;</code>. This has several advantages, most notably that it has an <code>'static</code>
lifetime.</div></li><li><div class="item-name"><a class="struct" href="struct.ArcRwLockWriteGuard.html" title="struct parking_lot::ArcRwLockWriteGuard">ArcRw<wbr>Lock<wbr>Write<wbr>Guard</a></div><div class="desc docblock-short">An RAII rwlock guard returned by the <code>Arc</code> locking operations on <code>RwLock</code>.
This is similar to the <code>RwLockWriteGuard</code> struct, except instead of using a reference to unlock the <code>RwLock</code>
it uses an <code>Arc&lt;RwLock&gt;</code>. This has several advantages, most notably that it has an <code>'static</code> lifetime.</div></li><li><div class="item-name"><a class="struct" href="struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></div><div class="desc docblock-short">A Condition Variable</div></li><li><div class="item-name"><a class="struct" href="struct.Once.html" title="struct parking_lot::Once">Once</a></div><div class="desc docblock-short">A synchronization primitive which can be used to run a one-time
initialization. Useful for one-time initialization for globals, FFI or
related functionality.</div></li><li><div class="item-name"><a class="struct" href="struct.RawFairMutex.html" title="struct parking_lot::RawFairMutex">RawFair<wbr>Mutex</a></div><div class="desc docblock-short">Raw fair mutex type backed by the parking lot.</div></li><li><div class="item-name"><a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></div><div class="desc docblock-short">Raw mutex type backed by the parking lot.</div></li><li><div class="item-name"><a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRw<wbr>Lock</a></div><div class="desc docblock-short">Raw reader-writer lock type backed by the parking lot.</div></li><li><div class="item-name"><a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThread<wbr>Id</a></div><div class="desc docblock-short">Implementation of the <code>GetThreadId</code> trait for <code>lock_api::ReentrantMutex</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">Wait<wbr>Timeout<wbr>Result</a></div><div class="desc docblock-short">A type indicating whether a timed wait on a condition variable returned
due to a time out or not.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.OnceState.html" title="enum parking_lot::OnceState">Once<wbr>State</a></div><div class="desc docblock-short">Current state of a <code>Once</code>.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.const_fair_mutex.html" title="fn parking_lot::const_fair_mutex">const_<wbr>fair_<wbr>mutex</a></div><div class="desc docblock-short">Creates a new fair mutex in an unlocked state ready for use.</div></li><li><div class="item-name"><a class="fn" href="fn.const_mutex.html" title="fn parking_lot::const_mutex">const_<wbr>mutex</a></div><div class="desc docblock-short">Creates a new mutex in an unlocked state ready for use.</div></li><li><div class="item-name"><a class="fn" href="fn.const_reentrant_mutex.html" title="fn parking_lot::const_reentrant_mutex">const_<wbr>reentrant_<wbr>mutex</a></div><div class="desc docblock-short">Creates a new reentrant mutex in an unlocked state ready for use.</div></li><li><div class="item-name"><a class="fn" href="fn.const_rwlock.html" title="fn parking_lot::const_rwlock">const_<wbr>rwlock</a></div><div class="desc docblock-short">Creates a new instance of an <code>RwLock&lt;T&gt;</code> which is unlocked.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.FairMutex.html" title="type parking_lot::FairMutex">Fair<wbr>Mutex</a></div><div class="desc docblock-short">A mutual exclusive primitive that is always fair, useful for protecting shared data</div></li><li><div class="item-name"><a class="type" href="type.FairMutexGuard.html" title="type parking_lot::FairMutexGuard">Fair<wbr>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="type" href="type.MappedFairMutexGuard.html" title="type parking_lot::MappedFairMutexGuard">Mapped<wbr>Fair<wbr>Mutex<wbr>Guard</a></div><div class="desc docblock-short">An RAII mutex guard returned by <code>FairMutexGuard::map</code>, which can point to a
subfield of the protected data.</div></li><li><div class="item-name"><a class="type" href="type.MappedMutexGuard.html" title="type parking_lot::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="type" href="type.MappedReentrantMutexGuard.html" title="type parking_lot::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="type" href="type.MappedRwLockReadGuard.html" title="type parking_lot::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="type" href="type.MappedRwLockWriteGuard.html" title="type parking_lot::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="type" href="type.Mutex.html" title="type parking_lot::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="type" href="type.MutexGuard.html" title="type parking_lot::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="type" href="type.ReentrantMutex.html" title="type parking_lot::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="type" href="type.ReentrantMutexGuard.html" title="type parking_lot::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="type" href="type.RwLock.html" title="type parking_lot::RwLock">RwLock</a></div><div class="desc docblock-short">A reader-writer lock</div></li><li><div class="item-name"><a class="type" href="type.RwLockReadGuard.html" title="type parking_lot::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="type" href="type.RwLockUpgradableReadGuard.html" title="type parking_lot::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="type" href="type.RwLockWriteGuard.html" title="type parking_lot::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></section></div></main></body></html>