<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `MAP` struct in crate `headless`."><metaname="keywords"content="rust, rustlang, rust-lang, MAP"><title>MAP in headless - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"href="../normalize.css"><linkrel="stylesheet"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"href="../ayu.css"disabled><linkrel="stylesheet"href="../dark.css"disabled><linkrel="stylesheet"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../main.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../headless/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../headless/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">MAP</a></h2><divclass="sidebar-elems"><section><divclass="block"><h3class="sidebar-title"><ahref="#fields">Fields</a></h3><ul><li><ahref="#structfield.__private_field">__private_field</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#deref-methods-RwLock%3CMap%3E">Methods from Deref<Target=RwLock<Map>></a></h3><ul><li><ahref="#method.clear_poison">clear_poison</a></li><li><ahref="#method.is_poisoned">is_poisoned</a></li><li><ahref="#method.read">read</a></li><li><ahref="#method.try_read">try_read</a></li><li><ahref="#method.try_write">try_write</a></li><li><ahref="#method.write">write</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#trait-implementations">Trait Implementations</a></h3><ul><li><ahref="#impl-Deref-for-MAP">Deref</a></li><li><ahref="#impl-LazyStatic-for-MAP">LazyStatic</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><ahref="#impl-RefUnwindSafe-for-MAP">RefUnwindSafe</a></li><li><ahref="#impl-Send-for-MAP">Send</a></li><li><ahref="#impl-Sync-for-MAP">Sync</a></li><li><ahref="#impl-Unpin-for-MAP">Unpin</a></li><li><ahref="#impl-UnwindSafe-for-MAP">UnwindSafe</a></li></ul></div><divclass="block"><h3class="sidebar-title"><ahref="#blanket-implementations">Blanket Implementations</a></h3><ul><li><ahref="#impl-Any-for-MAP">Any</a></li><li><ahref="#impl-Borrow%3CT%3E-for-MAP">Borrow<T></a></li><li><ahref="#impl-BorrowMut%3CT%3E-for-MAP">BorrowMut<T></a></li><li><ahref="#impl-Downcast-for-MAP">Downcast</a></li><li><ahref="#impl-DowncastSync-for-MAP">DowncastSync</a></li><li><ahref="#impl-From%3CT%3E-for-MAP">From<T></a></li><li><ahref="#impl-Instrument-for-MAP">Ins
<p>This function will return the <ahref="https://doc.rust-lang.org/1.65.0/std/sync/poison/enum.TryLockError.html#variant.Poisoned"><code>Poisoned</code></a> error if the RwLock is poisoned.
<p>This function will return the <ahref="https://doc.rust-lang.org/1.65.0/std/sync/poison/enum.TryLockError.html#variant.WouldBlock"><code>WouldBlock</code></a> error if the RwLock could not
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.write"class="method has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/1.65.0/src/std/sync/rwlock.rs.html#298">source</a></span><h4class="code-header">pub fn <ahref="#method.write"class="fnname">write</a>(<br> &self<br>) -><aclass="enum"href="https://doc.rust-lang.org/1.65.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="https://doc.rust-lang.org/1.65.0/std/sync/rwlock/struct.RwLockWriteGuard.html"title="struct std::sync::rwlock::RwLockWriteGuard">RwLockWriteGuard</a><'_, T>, <aclass="struct"href="https://doc.rust-lang.org/1.65.0/std/sync/poison/struct.PoisonError.html"title="struct std::sync::poison::PoisonError">PoisonError</a><<aclass="struct"href="https://doc.rust-lang.org/1.65.0/std/sync/rwlock/struct.RwLockWriteGuard.html"title="struct std::sync::rwlock::RwLockWriteGuard">RwLockWriteGuard</a><'_, T>>></h4></section></summary><divclass="docblock"><p>Locks this rwlock with exclusive write access, blocking the current
<p>This function will return the <ahref="https://doc.rust-lang.org/1.65.0/std/sync/poison/enum.TryLockError.html#variant.Poisoned"><code>Poisoned</code></a> error if the RwLock is
<p>This function will return the <ahref="https://doc.rust-lang.org/1.65.0/std/sync/poison/enum.TryLockError.html#variant.WouldBlock"><code>WouldBlock</code></a> error if the RwLock could not
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.is_poisoned"class="method has-srclink"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.2.0">1.2.0</span> · <aclass="srclink"href="https://doc.rust-lang.org/1.65.0/src/std/sync/rwlock.rs.html#377">source</a></span><h4class="code-header">pub fn <ahref="#method.is_poisoned"class="fnname">is_poisoned</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Determines whether the lock is poisoned.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.clear_poison"class="method has-srclink"><aclass="srclink rightside"href="https://doc.rust-lang.org/1.65.0/src/std/sync/rwlock.rs.html#416">source</a><h4class="code-header">pub fn <ahref="#method.clear_poison"class="fnname">clear_poison</a>(&self)</h4></section><spanclass="item-info"><divclass="stab unstable"><spanclass="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>mutex_unpoison</code>)</span></div></span></summary><divclass="docblock"><p>Clear the poisoned state from a lock</p>
</div></details></div></div><h2id="trait-implementations"class="small-section-header">Trait Implementations<ahref="#trait-implementations"class="anchor"></a></h2><divid="trait-implementations-list"><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-Deref-for-MAP"class="impl has-srclink"><aclass="srclink rightside"href="../src/headless/main.rs.html#39-51">source</a><ahref="#impl-Deref-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a> for <aclass="struct"href="struct.MAP.html"title="struct headless::MAP">MAP</a></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle"open><summary><sectionid="associatedtype.Target"class="associatedtype trait-impl has-srclink"><ahref="#associatedtype.Target"class="anchor"></a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.65.0/core/ops/deref/trait.Deref.html#associatedtype.Target"class="associatedtype">Target</a> = <aclass="struct"href="https://doc.rust-lang.org/1.65.0/std/sync/rwlock/struct.RwLock.html"title="struct std::sync::rwlock::RwLock">RwLock</a><Map></h4></section></summary><divclass='docblock'>The resulting type after dereferencing.</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.deref"class="method trait-impl has-srclink"><aclass="srclink rightside"href="../src/headless/main.rs.html#39-51">source</a><ahref="#method.deref"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.65.0/core/ops/deref/trait.Deref.html#tymethod.deref"class="fnname">deref</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/1.65.0/std/sync/rwlock/struct.RwLock.html"title="struct std::sync::rwlock::RwLock">RwLock</a><Map></h4></section></summary><divclass='docblock'>Dereferences the value.</div></details></div></details><sectionid="impl-LazyStatic-for-MAP"class="impl has-srclink"><aclass="srclink rightside"href="../src/headless/main.rs.html#39-51">source</a><ahref="#impl-LazyStatic-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://docs.rs/lazy_static/1.4.0/lazy_static/trait.LazyStatic.html"title="trait lazy_static::LazyStatic">LazyStatic</a> for <aclass="struct"href="struct.MAP.html"title="struct headless::MAP">MAP</a></h3></section></div><h2id="synthetic-implementations"class="small-section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor"></a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-MAP"class="impl has-srclink"><ahref="#impl-RefUnwindSafe-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="struct.MAP.html"title="struct headless::MAP">MAP</a></h3></section><sectionid="impl-Send-for-MAP"class="impl has-srclink"><ahref="#impl-Send-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="struct.MAP.html"title="struct headless::MAP">MAP</a></h3></section><sectionid="impl-Sync-for-MAP"class="impl has-srclink"><ahref="#impl-Sync-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="struct.MAP.html"title="struct headless::MAP">MAP</a></h3></section><sectionid="impl-Unpin-for-MAP"class="impl has-srclink"><ahref="#impl-Unpin-for-MAP"class="anchor"></a><h3class="code-header in-band">impl <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Unpin.html
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.into_any_rc"class="method trait-impl has-srclink"><ahref="#method.into_any_rc"class="anchor"></a><h4class="code-header">fn <aclass="fnname">into_any_rc</a>(self: <aclass="struct"href="https://doc.rust-lang.org/1.65.0/alloc/rc/struct.Rc.html"title="struct alloc::rc::Rc">Rc</a><T>) -><aclass="struct"href="https://doc.rust-lang.org/1.65.0/alloc/rc/struct.Rc.html"title="struct alloc::rc::Rc">Rc</a><dyn <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static></h4></section></summary><divclass='docblock'>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.as_any"class="method trait-impl has-srclink"><ahref="#method.as_any"class="anchor"></a><h4class="code-header">fn <aclass="fnname">as_any</a>(&self) ->&(dyn <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static)</h4></section></summary><divclass='docblock'>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
generate <code>&Any</code>’s vtable from <code>&Trait</code>’s. <a>Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.as_any_mut"class="method trait-impl has-srclink"><ahref="#method.as_any_mut"class="anchor"></a><h4class="code-header">fn <aclass="fnname">as_any_mut</a>(&mut self) ->&mut (dyn <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + 'static)</h4></section></summary><divclass='docblock'>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
generate <code>&mut Any</code>’s vtable from <code>&mut Trait</code>’s. <a>Read more</a></div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-DowncastSync-for-MAP"class="impl has-srclink"><ahref="#impl-DowncastSync-for-MAP"class="anchor"></a><h3class="code-header in-band">impl<T> DowncastSync for T<spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a>,</span></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.into_any_arc"class="method trait-impl has-srclink"><ahref="#method.into_any_arc"class="anchor"></a><h4class="code-header">fn <aclass="fnname">into_any_arc</a>(self: <aclass="struct"href="https://doc.rust-lang.org/1.65.0/alloc/sync/struct.Arc.html"title="struct alloc::sync::Arc">Arc</a><T>) -><aclass="struct"href="https://doc.rust-lang.org/1.65.0/alloc/sync/struct.Arc.html"title="struct alloc::sync::Arc">Arc</a><dyn <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/any/trait.Any.html"title="trait core::any::Any">Any</a> + <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + <aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> + 'static></h4></section></summary><divclass='docblock'>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a>Read more</a></div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-MAP"class="impl has-srclink"><aclass="srclink rightside"href="https://doc.rust-lang.org/1.65.0/src/core/convert/mod.rs.html#559">source</a><ahref="#impl-From%3CT%3E-for-MAP"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.65.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.from"class="method trait-impl has-srclink"><spanclass="rightside"><spanclass="since"title="const unstable">const: <ahref="https://github.com/rust-lang/rust/issues/88674"title="Tracking issue for const_convert">unstable</a></span> · <aclass="srclink"href="https://doc.rust-lang.org/1.65.0/src/core/convert/mod.rs.html#562">source</a></span><ahref="#method.from"class="anchor"></a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.65.0/core/convert/trait.From.html#tymethod.from"class="fnname">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument-for-MAP"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155">source</a><ahref="#impl-Instrument-for-MAP"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38">source</a><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#74">source</a><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the <ahref="../struct.Span.html#method.current">current</a><code>Span</code>, returning an