Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

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-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.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]--><rustdoc-topbar><h2><a href="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</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="#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" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>List of all items</h1><rustdoc-toolbar></rustdoc-toolbar></div><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.Condvar.html">Condvar</a></li><li><a href="struct.Once.html">Once</a></li><li><a href="struct.RawFairMutex.html">RawFairMutex</a></li><li><a href="struct.RawMutex.html">RawMutex</a></li><li><a href="struct.RawRwLock.html">RawRwLock</a></li><li><a href="struct.RawThreadId.html">RawThreadId</a></li><li><a href="struct.WaitTimeoutResult.html">WaitTimeoutResult</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.OnceState.html">OnceState</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="fn.const_fair_mutex.html">const_fair_mutex</a></li><li><a href="fn.const_mutex.html">const_mutex</a></li><li><a href="fn.const_reentrant_mutex.html">const_reentrant_mutex</a></li><li><a href="fn.const_rwlock.html">const_rwlock</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="type.FairMutex.html">FairMutex</a></li><li><a href="type.FairMutexGuard.html">FairMutexGuard</a></li><li><a href="type.MappedFairMutexGuard.html">MappedFairMutexGuard</a></li><li><a href="type.MappedMutexGuard.html">MappedMutexGuard</a></li><li><a href="type.MappedReentrantMutexGuard.html">MappedReentrantMutexGuard</a></li><li><a href="type.MappedRwLockReadGuard.html">MappedRwLockReadGuard</a></li><li><a href="type.MappedRwLockWriteGuard.html">MappedRwLockWriteGuard</a></li><li><a href="type.Mutex.html">Mutex</a></li><li><a href="type.MutexGuard.html">MutexGuard</a></li><li><a href="type.ReentrantMutex.html">ReentrantMutex</a></li><li><a href="type.ReentrantMutexGuard.html">ReentrantMutexGuard</a></li><li><a href="type.RwLock.html">RwLock</a></li><li><a href="type.RwLockReadGuard.html">RwLockReadGuard</a></li><li><a href="type.RwLockUpgradableReadGuard.html">RwLockUpgradableReadGuard</a></li><li><a href="type.RwLockWriteGuard.html">RwLockWriteGuard</a></li></ul></section></div></main></body></html>

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/fn.const_fair_mutex.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/fn.const_fair_mutex.html">../../parking_lot/fn.const_fair_mutex.html</a>...</p>
<script>location.replace("../../parking_lot/fn.const_fair_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=../../parking_lot/type.FairMutex.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.FairMutex.html">../../parking_lot/type.FairMutex.html</a>...</p>
<script>location.replace("../../parking_lot/type.FairMutex.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=../../parking_lot/type.FairMutexGuard.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.FairMutexGuard.html">../../parking_lot/type.FairMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.FairMutexGuard.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=../../parking_lot/type.MappedFairMutexGuard.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedFairMutexGuard.html">../../parking_lot/type.MappedFairMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedFairMutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Creates a new fair mutex in an unlocked state ready for use."><title>const_fair_mutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">const_fair_mutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Function <span class="fn">const_<wbr>fair_<wbr>mutex</span>&nbsp;<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/fair_mutex.rs.html#82-84">Source</a> </span></div><pre class="rust item-decl"><code>pub const fn const_fair_mutex&lt;T&gt;(val: T) -&gt; <a class="type" href="type.FairMutex.html" title="type parking_lot::FairMutex">FairMutex</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new fair mutex in an unlocked state ready for use.</p>
<p>This allows creating a fair mutex in a constant context on stable Rust.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Creates a new mutex in an unlocked state ready for use."><title>const_mutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">const_mutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Function <span class="fn">const_<wbr>mutex</span>&nbsp;<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/mutex.rs.html#91-93">Source</a> </span></div><pre class="rust item-decl"><code>pub const fn const_mutex&lt;T&gt;(val: T) -&gt; <a class="type" href="type.Mutex.html" title="type parking_lot::Mutex">Mutex</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new mutex in an unlocked state ready for use.</p>
<p>This allows creating a mutex in a constant context on stable Rust.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Creates a new reentrant mutex in an unlocked state ready for use."><title>const_reentrant_mutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">const_reentrant_mutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Function <span class="fn">const_<wbr>reentrant_<wbr>mutex</span>&nbsp;<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/remutex.rs.html#46-52">Source</a> </span></div><pre class="rust item-decl"><code>pub const fn const_reentrant_mutex&lt;T&gt;(val: T) -&gt; <a class="type" href="type.ReentrantMutex.html" title="type parking_lot::ReentrantMutex">ReentrantMutex</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new reentrant mutex in an unlocked state ready for use.</p>
<p>This allows creating a reentrant mutex in a constant context on stable Rust.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Creates a new instance of an `RwLock&#60;T&#62;` which is unlocked."><title>const_rwlock in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">const_rwlock</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Function <span class="fn">const_<wbr>rwlock</span>&nbsp;<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/rwlock.rs.html#93-95">Source</a> </span></div><pre class="rust item-decl"><code>pub const fn const_rwlock&lt;T&gt;(val: T) -&gt; <a class="type" href="type.RwLock.html" title="type parking_lot::RwLock">RwLock</a>&lt;T&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new instance of an <code>RwLock&lt;T&gt;</code> which is unlocked.</p>
<p>This allows creating a <code>RwLock&lt;T&gt;</code> in a constant context on stable Rust.</p>
</div></details></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="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-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.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]--><rustdoc-topbar><h2><a href="#">Crate parking_lot</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</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" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>parking_<wbr>lot</span>&nbsp;<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-62">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><dl class="item-table reexports"><dt id="reexport.lock_api"><code>pub use ::<a class="mod" href="../lock_api/index.html" title="mod lock_api">lock_api</a>;</code></dt></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Condvar.html" title="struct parking_lot::Condvar">Condvar</a></dt><dd>A Condition Variable</dd><dt><a class="struct" href="struct.Once.html" title="struct parking_lot::Once">Once</a></dt><dd>A synchronization primitive which can be used to run a one-time
initialization. Useful for one-time initialization for globals, FFI or
related functionality.</dd><dt><a class="struct" href="struct.RawFairMutex.html" title="struct parking_lot::RawFairMutex">RawFair<wbr>Mutex</a></dt><dd>Raw fair mutex type backed by the parking lot.</dd><dt><a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a></dt><dd>Raw mutex type backed by the parking lot.</dd><dt><a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRw<wbr>Lock</a></dt><dd>Raw reader-writer lock type backed by the parking lot.</dd><dt><a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThread<wbr>Id</a></dt><dd>Implementation of the <code>GetThreadId</code> trait for <code>lock_api::ReentrantMutex</code>.</dd><dt><a class="struct" href="struct.WaitTimeoutResult.html" title="struct parking_lot::WaitTimeoutResult">Wait<wbr>Timeout<wbr>Result</a></dt><dd>A type indicating whether a timed wait on a condition variable returned
due to a time out or not.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.OnceState.html" title="enum parking_lot::OnceState">Once<wbr>State</a></dt><dd>Current state of a <code>Once</code>.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.const_fair_mutex.html" title="fn parking_lot::const_fair_mutex">const_<wbr>fair_<wbr>mutex</a></dt><dd>Creates a new fair mutex in an unlocked state ready for use.</dd><dt><a class="fn" href="fn.const_mutex.html" title="fn parking_lot::const_mutex">const_<wbr>mutex</a></dt><dd>Creates a new mutex in an unlocked state ready for use.</dd><dt><a class="fn" href="fn.const_reentrant_mutex.html" title="fn parking_lot::const_reentrant_mutex">const_<wbr>reentrant_<wbr>mutex</a></dt><dd>Creates a new reentrant mutex in an unlocked state ready for use.</dd><dt><a class="fn" href="fn.const_rwlock.html" title="fn parking_lot::const_rwlock">const_<wbr>rwlock</a></dt><dd>Creates a new instance of an <code>RwLock&lt;T&gt;</code> which is unlocked.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.FairMutex.html" title="type parking_lot::FairMutex">Fair<wbr>Mutex</a></dt><dd>A mutual exclusive primitive that is always fair, useful for protecting shared data</dd><dt><a class="type" href="type.FairMutexGuard.html" title="type parking_lot::FairMutexGuard">Fair<wbr>Mutex<wbr>Guard</a></dt><dd>An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</dd><dt><a class="type" href="type.MappedFairMutexGuard.html" title="type parking_lot::MappedFairMutexGuard">Mapped<wbr>Fair<wbr>Mutex<wbr>Guard</a></dt><dd>An RAII mutex guard returned by <code>FairMutexGuard::map</code>, which can point to a
subfield of the protected data.</dd><dt><a class="type" href="type.MappedMutexGuard.html" title="type parking_lot::MappedMutexGuard">Mapped<wbr>Mutex<wbr>Guard</a></dt><dd>An RAII mutex guard returned by <code>MutexGuard::map</code>, which can point to a
subfield of the protected data.</dd><dt><a class="type" href="type.MappedReentrantMutexGuard.html" title="type parking_lot::MappedReentrantMutexGuard">Mapped<wbr>Reentrant<wbr>Mutex<wbr>Guard</a></dt><dd>An RAII mutex guard returned by <code>ReentrantMutexGuard::map</code>, which can point to a
subfield of the protected data.</dd><dt><a class="type" href="type.MappedRwLockReadGuard.html" title="type parking_lot::MappedRwLockReadGuard">Mapped<wbr>RwLock<wbr>Read<wbr>Guard</a></dt><dd>An RAII read lock guard returned by <code>RwLockReadGuard::map</code>, which can point to a
subfield of the protected data.</dd><dt><a class="type" href="type.MappedRwLockWriteGuard.html" title="type parking_lot::MappedRwLockWriteGuard">Mapped<wbr>RwLock<wbr>Write<wbr>Guard</a></dt><dd>An RAII write lock guard returned by <code>RwLockWriteGuard::map</code>, which can point to a
subfield of the protected data.</dd><dt><a class="type" href="type.Mutex.html" title="type parking_lot::Mutex">Mutex</a></dt><dd>A mutual exclusion primitive useful for protecting shared data</dd><dt><a class="type" href="type.MutexGuard.html" title="type parking_lot::MutexGuard">Mutex<wbr>Guard</a></dt><dd>An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</dd><dt><a class="type" href="type.ReentrantMutex.html" title="type parking_lot::ReentrantMutex">Reentrant<wbr>Mutex</a></dt><dd>A mutex which can be recursively locked by a single thread.</dd><dt><a class="type" href="type.ReentrantMutexGuard.html" title="type parking_lot::ReentrantMutexGuard">Reentrant<wbr>Mutex<wbr>Guard</a></dt><dd>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.</dd><dt><a class="type" href="type.RwLock.html" title="type parking_lot::RwLock">RwLock</a></dt><dd>A reader-writer lock</dd><dt><a class="type" href="type.RwLockReadGuard.html" title="type parking_lot::RwLockReadGuard">RwLock<wbr>Read<wbr>Guard</a></dt><dd>RAII structure used to release the shared read access of a lock when
dropped.</dd><dt><a class="type" href="type.RwLockUpgradableReadGuard.html" title="type parking_lot::RwLockUpgradableReadGuard">RwLock<wbr>Upgradable<wbr>Read<wbr>Guard</a></dt><dd>RAII structure used to release the upgradable read access of a lock when
dropped.</dd><dt><a class="type" href="type.RwLockWriteGuard.html" title="type parking_lot::RwLockWriteGuard">RwLock<wbr>Write<wbr>Guard</a></dt><dd>RAII structure used to release the exclusive write access of a lock when
dropped.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/fn.const_mutex.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/fn.const_mutex.html">../../parking_lot/fn.const_mutex.html</a>...</p>
<script>location.replace("../../parking_lot/fn.const_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=../../parking_lot/type.MappedMutexGuard.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedMutexGuard.html">../../parking_lot/type.MappedMutexGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedMutexGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/fn.const_reentrant_mutex.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/fn.const_reentrant_mutex.html">../../parking_lot/fn.const_reentrant_mutex.html</a>...</p>
<script>location.replace("../../parking_lot/fn.const_reentrant_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=../../parking_lot/struct.RawThreadId.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/struct.RawThreadId.html">../../parking_lot/struct.RawThreadId.html</a>...</p>
<script>location.replace("../../parking_lot/struct.RawThreadId.html" + location.search + location.hash);</script>
</body>
</html>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../parking_lot/fn.const_rwlock.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/fn.const_rwlock.html">../../parking_lot/fn.const_rwlock.html</a>...</p>
<script>location.replace("../../parking_lot/fn.const_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=../../parking_lot/type.MappedRwLockReadGuard.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../parking_lot/type.MappedRwLockReadGuard.html">../../parking_lot/type.MappedRwLockReadGuard.html</a>...</p>
<script>location.replace("../../parking_lot/type.MappedRwLockReadGuard.html" + location.search + location.hash);</script>
</body>
</html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["OnceState"],"fn":["const_fair_mutex","const_mutex","const_reentrant_mutex","const_rwlock"],"struct":["Condvar","Once","RawFairMutex","RawMutex","RawRwLock","RawThreadId","WaitTimeoutResult"],"type":["FairMutex","FairMutexGuard","MappedFairMutexGuard","MappedMutexGuard","MappedReentrantMutexGuard","MappedRwLockReadGuard","MappedRwLockWriteGuard","Mutex","MutexGuard","ReentrantMutex","ReentrantMutexGuard","RwLock","RwLockReadGuard","RwLockUpgradableReadGuard","RwLockWriteGuard"]};

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

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="Implementation of the `GetThreadId` trait for `lock_api::ReentrantMutex`."><title>RawThreadId in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.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]--><rustdoc-topbar><h2><a href="#">RawThreadId</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RawThread<wbr>Id</a></h2><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-GetThreadId-for-RawThreadId" title="GetThreadId">GetThreadId</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-RawThreadId" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-RawThreadId" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-RawThreadId" title="Send">Send</a></li><li><a href="#impl-Sync-for-RawThreadId" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-RawThreadId" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-RawThreadId" 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 parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Struct <span class="struct">RawThread<wbr>Id</span>&nbsp;<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/remutex.rs.html#13">Source</a> </span></div><pre class="rust item-decl"><code>pub struct RawThreadId;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Implementation of the <code>GetThreadId</code> trait for <code>lock_api::ReentrantMutex</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"><details class="toggle implementors-toggle" open><summary><section id="impl-GetThreadId-for-RawThreadId" class="impl"><a class="src rightside" href="../src/parking_lot/remutex.rs.html#15-28">Source</a><a href="#impl-GetThreadId-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../lock_api/remutex/trait.GetThreadId.html" title="trait lock_api::remutex::GetThreadId">GetThreadId</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.INIT" class="associatedconstant trait-impl"><a class="src rightside" href="../src/parking_lot/remutex.rs.html#16">Source</a><a href="#associatedconstant.INIT" class="anchor">§</a><h4 class="code-header">const <a href="../lock_api/remutex/trait.GetThreadId.html#associatedconstant.INIT" class="constant">INIT</a>: <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a> = RawThreadId</h4></section></summary><div class='docblock'>Initial value.</div></details><details class="toggle method-toggle" open><summary><section id="method.nonzero_thread_id" class="method trait-impl"><a class="src rightside" href="../src/parking_lot/remutex.rs.html#18-27">Source</a><a href="#method.nonzero_thread_id" class="anchor">§</a><h4 class="code-header">fn <a href="../lock_api/remutex/trait.GetThreadId.html#tymethod.nonzero_thread_id" class="fn">nonzero_thread_id</a>(&amp;self) -&gt; <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a></h4></section></summary><div class='docblock'>Returns a non-zero thread ID which identifies the current thread of
execution.</div></details></div></details></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-RawThreadId" class="impl"><a href="#impl-Freeze-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section><section id="impl-RefUnwindSafe-for-RawThreadId" class="impl"><a href="#impl-RefUnwindSafe-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section><section id="impl-Send-for-RawThreadId" class="impl"><a href="#impl-Send-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section><section id="impl-Sync-for-RawThreadId" class="impl"><a href="#impl-Sync-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section><section id="impl-Unpin-for-RawThreadId" class="impl"><a href="#impl-Unpin-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a></h3></section><section id="impl-UnwindSafe-for-RawThreadId" class="impl"><a href="#impl-UnwindSafe-for-RawThreadId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</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.93.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.93.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.93.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.93.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.93.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.93.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.93.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.93.1/src/core/borrow.rs.html#212">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.93.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.93.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.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.1/std/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.93.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.93.1/src/core/borrow.rs.html#221">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.93.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.93.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.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.1/std/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.93.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.93.1/src/core/convert/mod.rs.html#785">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.93.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.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.1/src/core/convert/mod.rs.html#767-769">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.93.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.93.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.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.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.93.1/src/core/convert/mod.rs.html#827-829">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.93.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.93.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.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.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.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.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.93.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.93.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.93.1/src/core/convert/mod.rs.html#811-813">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.93.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.93.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.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.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.93.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.93.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.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.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.93.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.93.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.93.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

View File

@@ -0,0 +1,59 @@
<!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="A mutual exclusive primitive that is always fair, useful for protecting shared data"><title>FairMutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">FairMutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Fair<wbr>Mutex</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#differences-from-the-standard-library-mutex" title="Differences from the standard library `Mutex`">Differences from the standard library <code>Mutex</code></a></li><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Fair<wbr>Mutex</span>&nbsp;<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/fair_mutex.rs.html#77">Source</a> </span></div><pre class="rust item-decl"><code>pub type FairMutex&lt;T&gt; = <a class="struct" href="../lock_api/mutex/struct.Mutex.html" title="struct lock_api::mutex::Mutex">Mutex</a>&lt;<a class="struct" href="struct.RawFairMutex.html" title="struct parking_lot::RawFairMutex">RawFairMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A mutual exclusive primitive that is always fair, useful for protecting shared data</p>
<p>This mutex will block threads waiting for the lock to become available. The
mutex can be statically initialized or created by the <code>new</code>
constructor. Each mutex has a type parameter which represents the data that
it is protecting. The data can only be accessed through the RAII guards
returned from <code>lock</code> and <code>try_lock</code>, which guarantees that the data is only
ever accessed when the mutex is locked.</p>
<p>The regular mutex provided by <code>parking_lot</code> uses eventual fairness
(after some time it will default to the fair algorithm), but eventual
fairness does not provide the same guarantees an always fair method would.
Fair mutexes are generally slower, but sometimes needed.</p>
<p>In a fair mutex the waiters form a queue, and the lock is always granted to
the next requester in the queue, in first-in first-out order. This ensures
that one thread cannot starve others by quickly re-acquiring the lock after
releasing it.</p>
<p>A fair mutex may not be interesting if threads have different priorities (this is known as
priority inversion).</p>
<h2 id="differences-from-the-standard-library-mutex"><a class="doc-anchor" href="#differences-from-the-standard-library-mutex">§</a>Differences from the standard library <code>Mutex</code></h2>
<ul>
<li>No poisoning, the lock is released normally on panic.</li>
<li>Only requires 1 byte of space, whereas the standard library boxes the
<code>FairMutex</code> due to platform limitations.</li>
<li>Can be statically constructed.</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
<li>Allows raw locking &amp; unlocking without a guard.</li>
</ul>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>parking_lot::FairMutex;
<span class="kw">use </span>std::sync::{Arc, mpsc::channel};
<span class="kw">use </span>std::thread;
<span class="kw">const </span>N: usize = <span class="number">10</span>;
<span class="comment">// Spawn a few threads to increment a shared variable (non-atomically), and
// let the main thread know once all increments are done.
//
// Here we're using an Arc to share memory among threads, and the data inside
// the Arc is protected with a mutex.
</span><span class="kw">let </span>data = Arc::new(FairMutex::new(<span class="number">0</span>));
<span class="kw">let </span>(tx, rx) = channel();
<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">10 </span>{
<span class="kw">let </span>(data, tx) = (Arc::clone(<span class="kw-2">&amp;</span>data), tx.clone());
thread::spawn(<span class="kw">move </span>|| {
<span class="comment">// The shared state can only be accessed once the lock is held.
// Our non-atomic increment is safe because we're the only thread
// which can access the shared state when the lock is held.
</span><span class="kw">let </span><span class="kw-2">mut </span>data = data.lock();
<span class="kw-2">*</span>data += <span class="number">1</span>;
<span class="kw">if </span><span class="kw-2">*</span>data == N {
tx.send(()).unwrap();
}
<span class="comment">// the lock is unlocked here when `data` goes out of scope.
</span>});
}
rx.recv().unwrap();</code></pre></div></div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct FairMutex&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.Mutex.js" data-self-path="parking_lot::fair_mutex::FairMutex" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked."><title>FairMutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">FairMutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Fair<wbr>Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Fair<wbr>Mutex<wbr>Guard</span>&nbsp;<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/fair_mutex.rs.html#91">Source</a> </span></div><pre class="rust item-decl"><code>pub type FairMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MutexGuard.html" title="struct lock_api::mutex::MutexGuard">MutexGuard</a>&lt;'a, <a class="struct" href="struct.RawFairMutex.html" title="struct parking_lot::RawFairMutex">RawFairMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</p>
<p>The data protected by the mutex can be accessed through this guard via its
<code>Deref</code> and <code>DerefMut</code> implementations.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct FairMutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.MutexGuard.js" data-self-path="parking_lot::fair_mutex::FairMutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII mutex guard returned by `FairMutexGuard::map`, which can point to a subfield of the protected data."><title>MappedFairMutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MappedFairMutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mapped<wbr>Fair<wbr>Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mapped<wbr>Fair<wbr>Mutex<wbr>Guard</span>&nbsp;<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/fair_mutex.rs.html#100">Source</a> </span></div><pre class="rust item-decl"><code>pub type MappedFairMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MappedMutexGuard.html" title="struct lock_api::mutex::MappedMutexGuard">MappedMutexGuard</a>&lt;'a, <a class="struct" href="struct.RawFairMutex.html" title="struct parking_lot::RawFairMutex">RawFairMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII mutex guard returned by <code>FairMutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedFairMutexGuard</code> and <code>FairMutexGuard</code> is that the
former doesnt support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MappedFairMutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.MappedMutexGuard.js" data-self-path="parking_lot::fair_mutex::MappedFairMutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII mutex guard returned by `MutexGuard::map`, which can point to a subfield of the protected data."><title>MappedMutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MappedMutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mapped<wbr>Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mapped<wbr>Mutex<wbr>Guard</span>&nbsp;<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/mutex.rs.html#109">Source</a> </span></div><pre class="rust item-decl"><code>pub type MappedMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MappedMutexGuard.html" title="struct lock_api::mutex::MappedMutexGuard">MappedMutexGuard</a>&lt;'a, <a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII mutex guard returned by <code>MutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedMutexGuard</code> and <code>MutexGuard</code> is that the
former doesnt support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MappedMutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.MappedMutexGuard.js" data-self-path="parking_lot::mutex::MappedMutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII mutex guard returned by `ReentrantMutexGuard::map`, which can point to a subfield of the protected data."><title>MappedReentrantMutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MappedReentrantMutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mapped<wbr>Reentrant<wbr>Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mapped<wbr>Reentrant<wbr>Mutex<wbr>Guard</span>&nbsp;<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/remutex.rs.html#68-69">Source</a> </span></div><pre class="rust item-decl"><code>pub type MappedReentrantMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/remutex/struct.MappedReentrantMutexGuard.html" title="struct lock_api::remutex::MappedReentrantMutexGuard">MappedReentrantMutexGuard</a>&lt;'a, <a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII mutex guard returned by <code>ReentrantMutexGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedReentrantMutexGuard</code> and <code>ReentrantMutexGuard</code> is that the
former doesnt support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MappedReentrantMutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/remutex/struct.MappedReentrantMutexGuard.js" data-self-path="parking_lot::remutex::MappedReentrantMutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII read lock guard returned by `RwLockReadGuard::map`, which can point to a subfield of the protected data."><title>MappedRwLockReadGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MappedRwLockReadGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mapped<wbr>RwLock<wbr>Read<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mapped<wbr>RwLock<wbr>Read<wbr>Guard</span>&nbsp;<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/rwlock.rs.html#112">Source</a> </span></div><pre class="rust item-decl"><code>pub type MappedRwLockReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.MappedRwLockReadGuard.html" title="struct lock_api::rwlock::MappedRwLockReadGuard">MappedRwLockReadGuard</a>&lt;'a, <a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII read lock guard returned by <code>RwLockReadGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedRwLockReadGuard</code> and <code>RwLockReadGuard</code> is that the
former doesnt support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MappedRwLockReadGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.MappedRwLockReadGuard.js" data-self-path="parking_lot::rwlock::MappedRwLockReadGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII write lock guard returned by `RwLockWriteGuard::map`, which can point to a subfield of the protected data."><title>MappedRwLockWriteGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MappedRwLockWriteGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mapped<wbr>RwLock<wbr>Write<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mapped<wbr>RwLock<wbr>Write<wbr>Guard</span>&nbsp;<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/rwlock.rs.html#121">Source</a> </span></div><pre class="rust item-decl"><code>pub type MappedRwLockWriteGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.MappedRwLockWriteGuard.html" title="struct lock_api::rwlock::MappedRwLockWriteGuard">MappedRwLockWriteGuard</a>&lt;'a, <a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII write lock guard returned by <code>RwLockWriteGuard::map</code>, which can point to a
subfield of the protected data.</p>
<p>The main difference between <code>MappedRwLockWriteGuard</code> and <code>RwLockWriteGuard</code> is that the
former doesnt support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MappedRwLockWriteGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.MappedRwLockWriteGuard.js" data-self-path="parking_lot::rwlock::MappedRwLockWriteGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,66 @@
<!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="A mutual exclusion primitive useful for protecting shared data"><title>Mutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Mutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mutex</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#fairness" title="Fairness">Fairness</a></li><li><a href="#differences-from-the-standard-library-mutex" title="Differences from the standard library `Mutex`">Differences from the standard library <code>Mutex</code></a></li><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mutex</span>&nbsp;<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/mutex.rs.html#86">Source</a> </span></div><pre class="rust item-decl"><code>pub type Mutex&lt;T&gt; = <a class="struct" href="../lock_api/mutex/struct.Mutex.html" title="struct lock_api::mutex::Mutex">Mutex</a>&lt;<a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A mutual exclusion primitive useful for protecting shared data</p>
<p>This mutex will block threads waiting for the lock to become available. The
mutex can be statically initialized or created by the <code>new</code>
constructor. Each mutex has a type parameter which represents the data that
it is protecting. The data can only be accessed through the RAII guards
returned from <code>lock</code> and <code>try_lock</code>, which guarantees that the data is only
ever accessed when the mutex is locked.</p>
<h2 id="fairness"><a class="doc-anchor" href="#fairness">§</a>Fairness</h2>
<p>A typical unfair lock can often end up in a situation where a single thread
quickly acquires and releases the same mutex in succession, which can starve
other threads waiting to acquire the mutex. While this improves throughput
because it doesnt force a context switch when a thread tries to re-acquire
a mutex it has just released, this can starve other threads.</p>
<p>This mutex uses <a href="https://trac.webkit.org/changeset/203350">eventual fairness</a>
to ensure that the lock will be fair on average without sacrificing
throughput. This is done by forcing a fair unlock on average every 0.5ms,
which will force the lock to go to the next thread waiting for the mutex.</p>
<p>Additionally, any critical section longer than 1ms will always use a fair
unlock, which has a negligible impact on throughput considering the length
of the critical section.</p>
<p>You can also force a fair unlock by calling <code>MutexGuard::unlock_fair</code> when
unlocking a mutex instead of simply dropping the <code>MutexGuard</code>.</p>
<h2 id="differences-from-the-standard-library-mutex"><a class="doc-anchor" href="#differences-from-the-standard-library-mutex">§</a>Differences from the standard library <code>Mutex</code></h2>
<ul>
<li>No poisoning, the lock is released normally on panic.</li>
<li>Only requires 1 byte of space, whereas the standard library boxes the
<code>Mutex</code> due to platform limitations.</li>
<li>Can be statically constructed.</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
<li>Allows raw locking &amp; unlocking without a guard.</li>
<li>Supports eventual fairness so that the mutex is fair on average.</li>
<li>Optionally allows making the mutex fair by calling <code>MutexGuard::unlock_fair</code>.</li>
</ul>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>parking_lot::Mutex;
<span class="kw">use </span>std::sync::{Arc, mpsc::channel};
<span class="kw">use </span>std::thread;
<span class="kw">const </span>N: usize = <span class="number">10</span>;
<span class="comment">// Spawn a few threads to increment a shared variable (non-atomically), and
// let the main thread know once all increments are done.
//
// Here we're using an Arc to share memory among threads, and the data inside
// the Arc is protected with a mutex.
</span><span class="kw">let </span>data = Arc::new(Mutex::new(<span class="number">0</span>));
<span class="kw">let </span>(tx, rx) = channel();
<span class="kw">for _ in </span><span class="number">0</span>..<span class="number">10 </span>{
<span class="kw">let </span>(data, tx) = (Arc::clone(<span class="kw-2">&amp;</span>data), tx.clone());
thread::spawn(<span class="kw">move </span>|| {
<span class="comment">// The shared state can only be accessed once the lock is held.
// Our non-atomic increment is safe because we're the only thread
// which can access the shared state when the lock is held.
</span><span class="kw">let </span><span class="kw-2">mut </span>data = data.lock();
<span class="kw-2">*</span>data += <span class="number">1</span>;
<span class="kw">if </span><span class="kw-2">*</span>data == N {
tx.send(()).unwrap();
}
<span class="comment">// the lock is unlocked here when `data` goes out of scope.
</span>});
}
rx.recv().unwrap();</code></pre></div></div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Mutex&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.Mutex.js" data-self-path="parking_lot::mutex::Mutex" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked."><title>MutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Mutex<wbr>Guard</span>&nbsp;<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/mutex.rs.html#100">Source</a> </span></div><pre class="rust item-decl"><code>pub type MutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/mutex/struct.MutexGuard.html" title="struct lock_api::mutex::MutexGuard">MutexGuard</a>&lt;'a, <a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.</p>
<p>The data protected by the mutex can be accessed through this guard via its
<code>Deref</code> and <code>DerefMut</code> implementations.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct MutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/mutex/struct.MutexGuard.js" data-self-path="parking_lot::mutex::MutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A mutex which can be recursively locked by a single thread."><title>ReentrantMutex in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">ReentrantMutex</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Reentrant<wbr>Mutex</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Reentrant<wbr>Mutex</span>&nbsp;<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/remutex.rs.html#41">Source</a> </span></div><pre class="rust item-decl"><code>pub type ReentrantMutex&lt;T&gt; = <a class="struct" href="../lock_api/remutex/struct.ReentrantMutex.html" title="struct lock_api::remutex::ReentrantMutex">ReentrantMutex</a>&lt;<a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A mutex which can be recursively locked by a single thread.</p>
<p>This type is identical to <code>Mutex</code> except for the following points:</p>
<ul>
<li>Locking multiple times from the same thread will work correctly instead of
deadlocking.</li>
<li><code>ReentrantMutexGuard</code> does not give mutable references to the locked data.
Use a <code>RefCell</code> if you need this.</li>
</ul>
<p>See <a href="type.Mutex.html" title="type parking_lot::Mutex"><code>Mutex</code></a> for more details about the underlying mutex
primitive.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct ReentrantMutex&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/remutex/struct.ReentrantMutex.js" data-self-path="parking_lot::remutex::ReentrantMutex" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="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."><title>ReentrantMutexGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">ReentrantMutexGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Reentrant<wbr>Mutex<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">Reentrant<wbr>Mutex<wbr>Guard</span>&nbsp;<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/remutex.rs.html#59">Source</a> </span></div><pre class="rust item-decl"><code>pub type ReentrantMutexGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/remutex/struct.ReentrantMutexGuard.html" title="struct lock_api::remutex::ReentrantMutexGuard">ReentrantMutexGuard</a>&lt;'a, <a class="struct" href="struct.RawMutex.html" title="struct parking_lot::RawMutex">RawMutex</a>, <a class="struct" href="struct.RawThreadId.html" title="struct parking_lot::RawThreadId">RawThreadId</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>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.</p>
<p>The data protected by the mutex can be accessed through this guard via its
<code>Deref</code> implementation.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct ReentrantMutexGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/remutex/struct.ReentrantMutexGuard.js" data-self-path="parking_lot::remutex::ReentrantMutexGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,66 @@
<!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="A reader-writer lock"><title>RwLock in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">RwLock</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RwLock</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#fairness" title="Fairness">Fairness</a></li><li><a href="#differences-from-the-standard-library-rwlock" title="Differences from the standard library `RwLock`">Differences from the standard library <code>RwLock</code></a></li><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">RwLock</span>&nbsp;<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/rwlock.rs.html#88">Source</a> </span></div><pre class="rust item-decl"><code>pub type RwLock&lt;T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLock.html" title="struct lock_api::rwlock::RwLock">RwLock</a>&lt;<a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A reader-writer lock</p>
<p>This type of lock allows a number of readers or at most one writer at any
point in time. The write portion of this lock typically allows modification
of the underlying data (exclusive access) and the read portion of this lock
typically allows for read-only access (shared access).</p>
<p>This lock uses a task-fair locking policy which avoids both reader and
writer starvation. This means that readers trying to acquire the lock will
block even if the lock is unlocked when there are writers waiting to acquire
the lock. Because of this, attempts to recursively acquire a read lock
within a single thread may result in a deadlock.</p>
<p>The type parameter <code>T</code> represents the data that this lock protects. It is
required that <code>T</code> satisfies <code>Send</code> to be shared across threads and <code>Sync</code> to
allow concurrent access through readers. The RAII guards returned from the
locking methods implement <code>Deref</code> (and <code>DerefMut</code> for the <code>write</code> methods)
to allow access to the contained of the lock.</p>
<h2 id="fairness"><a class="doc-anchor" href="#fairness">§</a>Fairness</h2>
<p>A typical unfair lock can often end up in a situation where a single thread
quickly acquires and releases the same lock in succession, which can starve
other threads waiting to acquire the rwlock. While this improves throughput
because it doesnt force a context switch when a thread tries to re-acquire
a rwlock it has just released, this can starve other threads.</p>
<p>This rwlock uses <a href="https://trac.webkit.org/changeset/203350">eventual fairness</a>
to ensure that the lock will be fair on average without sacrificing
throughput. This is done by forcing a fair unlock on average every 0.5ms,
which will force the lock to go to the next thread waiting for the rwlock.</p>
<p>Additionally, any critical section longer than 1ms will always use a fair
unlock, which has a negligible impact on throughput considering the length
of the critical section.</p>
<p>You can also force a fair unlock by calling <code>RwLockReadGuard::unlock_fair</code>
or <code>RwLockWriteGuard::unlock_fair</code> when unlocking a mutex instead of simply
dropping the guard.</p>
<h2 id="differences-from-the-standard-library-rwlock"><a class="doc-anchor" href="#differences-from-the-standard-library-rwlock">§</a>Differences from the standard library <code>RwLock</code></h2>
<ul>
<li>Supports atomically downgrading a write lock into a read lock.</li>
<li>Task-fair locking policy instead of an unspecified platform default.</li>
<li>No poisoning, the lock is released normally on panic.</li>
<li>Only requires 1 word of space, whereas the standard library boxes the
<code>RwLock</code> due to platform limitations.</li>
<li>Can be statically constructed.</li>
<li>Does not require any drop glue when dropped.</li>
<li>Inline fast path for the uncontended case.</li>
<li>Efficient handling of micro-contention using adaptive spinning.</li>
<li>Allows raw locking &amp; unlocking without a guard.</li>
<li>Supports eventual fairness so that the rwlock is fair on average.</li>
<li>Optionally allows making the rwlock fair by calling
<code>RwLockReadGuard::unlock_fair</code> and <code>RwLockWriteGuard::unlock_fair</code>.</li>
</ul>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>parking_lot::RwLock;
<span class="kw">let </span>lock = RwLock::new(<span class="number">5</span>);
<span class="comment">// many reader locks can be held at once
</span>{
<span class="kw">let </span>r1 = lock.read();
<span class="kw">let </span>r2 = lock.read();
<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>r1, <span class="number">5</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>r2, <span class="number">5</span>);
} <span class="comment">// read locks are dropped at this point
// only one write lock may be held, however
</span>{
<span class="kw">let </span><span class="kw-2">mut </span>w = lock.write();
<span class="kw-2">*</span>w += <span class="number">1</span>;
<span class="macro">assert_eq!</span>(<span class="kw-2">*</span>w, <span class="number">6</span>);
} <span class="comment">// write lock is dropped here</span></code></pre></div></div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct RwLock&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.RwLock.js" data-self-path="parking_lot::rwlock::RwLock" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="RAII structure used to release the shared read access of a lock when dropped."><title>RwLockReadGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">RwLockReadGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RwLock<wbr>Read<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">RwLock<wbr>Read<wbr>Guard</span>&nbsp;<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/rwlock.rs.html#99">Source</a> </span></div><pre class="rust item-decl"><code>pub type RwLockReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockReadGuard.html" title="struct lock_api::rwlock::RwLockReadGuard">RwLockReadGuard</a>&lt;'a, <a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>RAII structure used to release the shared read access of a lock when
dropped.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct RwLockReadGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.RwLockReadGuard.js" data-self-path="parking_lot::rwlock::RwLockReadGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="RAII structure used to release the upgradable read access of a lock when dropped."><title>RwLockUpgradableReadGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">RwLockUpgradableReadGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RwLock<wbr>Upgradable<wbr>Read<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">RwLock<wbr>Upgradable<wbr>Read<wbr>Guard</span>&nbsp;<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/rwlock.rs.html#125">Source</a> </span></div><pre class="rust item-decl"><code>pub type RwLockUpgradableReadGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockUpgradableReadGuard.html" title="struct lock_api::rwlock::RwLockUpgradableReadGuard">RwLockUpgradableReadGuard</a>&lt;'a, <a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>RAII structure used to release the upgradable read access of a lock when
dropped.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct RwLockUpgradableReadGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.RwLockUpgradableReadGuard.js" data-self-path="parking_lot::rwlock::RwLockUpgradableReadGuard" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="RAII structure used to release the exclusive write access of a lock when dropped."><title>RwLockWriteGuard in parking_lot - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.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.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">RwLockWriteGuard</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../parking_lot/index.html">parking_<wbr>lot</a><span class="version">0.12.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">RwLock<wbr>Write<wbr>Guard</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate parking_<wbr>lot</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">parking_lot</a></div><h1>Type Alias <span class="type">RwLock<wbr>Write<wbr>Guard</span>&nbsp;<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/rwlock.rs.html#103">Source</a> </span></div><pre class="rust item-decl"><code>pub type RwLockWriteGuard&lt;'a, T&gt; = <a class="struct" href="../lock_api/rwlock/struct.RwLockWriteGuard.html" title="struct lock_api::rwlock::RwLockWriteGuard">RwLockWriteGuard</a>&lt;'a, <a class="struct" href="struct.RawRwLock.html" title="struct parking_lot::RawRwLock">RawRwLock</a>, T&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>RAII structure used to release the exclusive write access of a lock when
dropped.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct RwLockWriteGuard&lt;'a, T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../type.impl/lock_api/rwlock/struct.RwLockWriteGuard.js" data-self-path="parking_lot::rwlock::RwLockWriteGuard" async></script></section></div></main></body></html>