use <ahref="type.RawRestoreState.html"title="type critical_section::RawRestoreState"><code>RawRestoreState</code></a> so that they can use the inner value.</p>
<p>This can be useful to avoid <code>Option</code> when storing a <code>RestoreState</code> in a
struct field, or a <code>static</code>.</p>
<p>Note that due to the safety contract of <ahref="fn.acquire.html"title="fn critical_section::acquire"><code>acquire</code></a>/<ahref="fn.release.html"title="fn critical_section::release"><code>release</code></a>, you must not pass
a <code>RestoreState</code> obtained from this method to <ahref="fn.release.html"title="fn critical_section::release"><code>release</code></a>.</p>
</div></details></div></details></div><h2id="trait-implementations"class="small-section-header">Trait Implementations<ahref="#trait-implementations"class="anchor">§</a></h2><divid="trait-implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Clone-for-RestoreState"class="impl"><aclass="src rightside"href="../src/critical_section/lib.rs.html#121">source</a><ahref="#impl-Clone-for-RestoreState"class="anchor">§</a><h3class="code-header">impl Clone for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone"class="method trait-impl"><aclass="src rightside"href="../src/critical_section/lib.rs.html#121">source</a><ahref="#method.clone"class="anchor">§</a><h4class="code-header">fn <aclass="fn">clone</a>(&self) -><aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h4></section></summary><divclass='docblock'>Returns a copy of the value. <a>Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_from"class="method trait-impl"><spanclass="since rightside"title="Stable since Rust version 1.0.0">1.0.0</span><ahref="#method.clone_from"class="anchor">§</a><h4class="code-header">fn <aclass="fn">clone_from</a>(&mut self, source: &Self)</h4></section></summary><divclass='docblock'>Performs copy-assignment from <code>source</code>. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-Debug-for-RestoreState"class="impl"><aclass="src rightside"href="../src/critical_section/lib.rs.html#121">source</a><ahref="#impl-Debug-for-RestoreState"class="anchor">§</a><h3class="code-header">impl Debug for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.fmt"class="method trait-impl"><aclass="src rightside"href="../src/critical_section/lib.rs.html#121">source</a><ahref="#method.fmt"class="anchor">§</a><h4class="code-header">fn <aclass="fn">fmt</a>(&self, f: &mut Formatter<'_>) -> Result</h4></section></summary><divclass='docblock'>Formats the value using the given formatter. <a>Read more</a></div></details></div></details><sectionid="impl-Copy-for-RestoreState"class="impl"><aclass="src rightside"href="../src/critical_section/lib.rs.html#121">source</a><ahref="#impl-Copy-for-RestoreState"class="anchor">§</a><h3class="code-header">impl Copy for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</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-RestoreState"class="impl"><ahref="#impl-RefUnwindSafe-for-RestoreState"class="anchor">§</a><h3class="code-header">impl RefUnwindSafe for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h3></section><sectionid="impl-Send-for-RestoreState"class="impl"><ahref="#impl-Send-for-RestoreState"class="anchor">§</a><h3class="code-header">impl Send for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h3></section><sectionid="impl-Sync-for-RestoreState"class="impl"><ahref="#impl-Sync-for-RestoreState"class="anchor">§</a><h3class="code-header">impl Sync for <aclass="struct"href="struct.RestoreState.html"title="struct critical_section::RestoreState">RestoreState</a></h3></section><sectionid="impl-Unpin-for-RestoreState"class="impl"><ahref="#impl-Unpin-for
T: 'static + ?Sized,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <aclass="fn">type_id</a>(&self) -> TypeId</h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-RestoreState"class="impl"><ahref="#impl-Borrow%3CT%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T> Borrow<T> for T<spanclass="where fmt-newline">where
T: ?Sized,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <aclass="fn">borrow</a>(&self) ->&T</h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-RestoreState"class="impl"><ahref="#impl-BorrowMut%3CT%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T> BorrowMut<T> for T<spanclass="where fmt-newline">where
T: ?Sized,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <aclass="fn">borrow_mut</a>(&mut self) ->&mut T</h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <a>Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-RestoreState"class="impl"><ahref="#impl-From%3CT%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T> From<T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from"class="method trait-impl"><ahref="#method.from"class="anchor">§</a><h4class="code-header">fn <aclass="fn">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-RestoreState"class="impl"><ahref="#impl-Into%3CU%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T, U> Into<U> for T<spanclass="where fmt-newline">where
<p>That is, this conversion is whatever the implementation of
<code>[From]<T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-RestoreState"class="impl"><ahref="#impl-TryFrom%3CU%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T, U> TryFrom<U> for T<spanclass="where fmt-newline">where
U: Into<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = Infallible</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_from</a>(value: U) -> Result<T, <T as TryFrom<U>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-RestoreState"class="impl"><ahref="#impl-TryInto%3CU%3E-for-RestoreState"class="anchor">§</a><h3class="code-header">impl<T, U> TryInto<U> for T<spanclass="where fmt-newline">where
U: TryFrom<T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <aclass="associatedtype">Error</a> = <U as TryFrom<T>>::Error</h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <aclass="fn">try_into</a>(self) -> Result<U, <U as TryFrom<T>>::Error></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>