Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 4e2dbb669434a7691662cb2f0ad38972 > files > 14101

rust-doc-1.28.0-1.mga6.armv7hl.rpm

<!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="API documentation for the Rust `AssertUnwindSafe` struct in crate `std`."><meta name="keywords" content="rust, rustlang, rust-lang, AssertUnwindSafe"><title>std::panic::AssertUnwindSafe - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico"></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a><p class='location'>Struct AssertUnwindSafe</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-UnwindSafe">UnwindSafe</a><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-FnOnce%3C()%3E">FnOnce&lt;()&gt;</a><a href="#impl-Debug">Debug</a><a href="#impl-Future">Future</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>panic</a></p><script>window.sidebarCurrent = {name: 'AssertUnwindSafe', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>std</a>::<wbr><a href='index.html'>panic</a>::<wbr><a class="struct" href=''>AssertUnwindSafe</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.9.0'>1.9.0</span><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/std/panic.rs.html#193-196' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct AssertUnwindSafe&lt;T&gt;(pub T);</pre></div><div class='docblock'><p>A simple wrapper around a type to assert that it is unwind safe.</p>
<p>When using <a href="./fn.catch_unwind.html"><code>catch_unwind</code></a> it may be the case that some of the closed over
variables are not unwind safe. For example if <code>&amp;mut T</code> is captured the
compiler will generate a warning indicating that it is not unwind safe. It
may not be the case, however, that this is actually a problem due to the
specific usage of <a href="./fn.catch_unwind.html"><code>catch_unwind</code></a> if unwind safety is specifically taken into
account. This wrapper struct is useful for a quick and lightweight
annotation that a variable is indeed unwind safe.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<p>One way to use <code>AssertUnwindSafe</code> is to assert that the entire closure
itself is unwind safe, bypassing all checks for all variables:</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">panic</span>::{<span class="self">self</span>, <span class="ident">AssertUnwindSafe</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">variable</span> <span class="op">=</span> <span class="number">4</span>;

<span class="comment">// This code will not compile because the closure captures `&amp;mut variable`</span>
<span class="comment">// which is not considered unwind safe by default.</span>

<span class="comment">// panic::catch_unwind(|| {</span>
<span class="comment">//     variable += 3;</span>
<span class="comment">// });</span>

<span class="comment">// This, however, will compile due to the `AssertUnwindSafe` wrapper</span>
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">panic</span>::<span class="ident">catch_unwind</span>(<span class="ident">AssertUnwindSafe</span>(<span class="op">||</span> {
    <span class="ident">variable</span> <span class="op">+=</span> <span class="number">3</span>;
}));
<span class="comment">// ...</span><a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Apanic%3A%3A%7Bself%2C%20AssertUnwindSafe%7D%3B%0A%0Alet%20mut%20variable%20%3D%204%3B%0A%0A%2F%2F%20This%20code%20will%20not%20compile%20because%20the%20closure%20captures%20%60%26mut%20variable%60%0A%2F%2F%20which%20is%20not%20considered%20unwind%20safe%20by%20default.%0A%0A%2F%2F%20panic%3A%3Acatch_unwind(%7C%7C%20%7B%0A%2F%2F%20%20%20%20%20variable%20%2B%3D%203%3B%0A%2F%2F%20%7D)%3B%0A%0A%2F%2F%20This%2C%20however%2C%20will%20compile%20due%20to%20the%20%60AssertUnwindSafe%60%20wrapper%0Alet%20result%20%3D%20panic%3A%3Acatch_unwind(AssertUnwindSafe(%7C%7C%20%7B%0A%20%20%20%20variable%20%2B%3D%203%3B%0A%7D))%3B%0A%2F%2F%20...%0A%7D">Run</a></pre>
<p>Wrapping the entire closure amounts to a blanket assertion that all captured
variables are unwind safe. This has the downside that if new captures are
added in the future, they will also be considered unwind safe. Therefore,
you may prefer to just wrap individual captures, as shown below. This is
more annotation, but it ensures that if a new capture is added which is not
unwind safe, you will get a compilation error at that time, which will
allow you to consider whether that new capture in fact represent a bug or
not.</p>

<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">panic</span>::{<span class="self">self</span>, <span class="ident">AssertUnwindSafe</span>};

<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">variable</span> <span class="op">=</span> <span class="number">4</span>;
<span class="kw">let</span> <span class="ident">other_capture</span> <span class="op">=</span> <span class="number">3</span>;

<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> {
    <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">wrapper</span> <span class="op">=</span> <span class="ident">AssertUnwindSafe</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">variable</span>);
    <span class="ident">panic</span>::<span class="ident">catch_unwind</span>(<span class="kw">move</span> <span class="op">||</span> {
        <span class="kw-2">*</span><span class="kw-2">*</span><span class="ident">wrapper</span> <span class="op">+=</span> <span class="ident">other_capture</span>;
    })
};
<span class="comment">// ...</span><a class="test-arrow" target="_blank" href="https://play.rust-lang.org/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Ause%20std%3A%3Apanic%3A%3A%7Bself%2C%20AssertUnwindSafe%7D%3B%0A%0Alet%20mut%20variable%20%3D%204%3B%0Alet%20other_capture%20%3D%203%3B%0A%0Alet%20result%20%3D%20%7B%0A%20%20%20%20let%20mut%20wrapper%20%3D%20AssertUnwindSafe(%26mut%20variable)%3B%0A%20%20%20%20panic%3A%3Acatch_unwind(move%20%7C%7C%20%7B%0A%20%20%20%20%20%20%20%20**wrapper%20%2B%3D%20other_capture%3B%0A%20%20%20%20%7D)%0A%7D%3B%0A%2F%2F%20...%0A%7D">Run</a></pre>
</div>
                <h2 id='implementations' class='small-section-header'>
                  Trait Implementations<a href='#implementations' class='anchor'></a>
                </h2>
                <div id='implementations-list'><h3 id='impl-UnwindSafe' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt;</code><a href='#impl-UnwindSafe' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#223' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt;</code><a href='#impl-RefUnwindSafe' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#240' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Deref' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/ops/trait.Deref.html" title="trait std::ops::Deref">Deref</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt;</code><a href='#impl-Deref' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#288-294' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Target' class="type"><span id='Target.t' class='invisible'><code>type <a href='../../std/ops/trait.Deref.html#associatedtype.Target' class="type">Target</a> = T</code></span></h4>
<div class='docblock'><p>The resulting type after dereferencing.</p>
</div><h4 id='method.deref' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;'a, R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>R</span><span class="where fmt-newline">impl&lt;'a, W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>W</span></code></div></div><span id='deref.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../std/ops/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&amp;self) -&gt; <a class="primitive" href="../primitive.reference.html">&amp;</a>T</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#291-293' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Dereferences the value.</p>
</div></div><h3 id='impl-DerefMut' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/ops/trait.DerefMut.html" title="trait std::ops::DerefMut">DerefMut</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt;</code><a href='#impl-DerefMut' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#297-301' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.deref_mut' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, I&gt; <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>I <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>,&nbsp;</span></span><span class="where fmt-newline">    type <a href='../../std/iter/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &lt;I as <a class="trait" href="../../std/iter/trait.Iterator.html" title="trait std::iter::Iterator">Iterator</a>&gt;::<a class="type" href="../../std/iter/trait.Iterator.html#associatedtype.Item" title="type std::iter::Iterator::Item">Item</a>;</span><span class="where fmt-newline">impl&lt;'a, R:&nbsp;<a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>R</span><span class="where fmt-newline">impl&lt;'a, W:&nbsp;<a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> + ?<a class="trait" href="../../std/marker/trait.Sized.html" title="trait std::marker::Sized">Sized</a>&gt; <a class="trait" href="../../std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="../primitive.reference.html">&amp;'a mut </a>W</span></code></div></div><span id='deref_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../std/ops/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="../primitive.reference.html">&amp;mut </a>T</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#298-300' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Mutably dereferences the value.</p>
</div></div><h3 id='impl-FnOnce%3C()%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;R, F:&nbsp;<a class="trait" href="../../std/ops/trait.FnOnce.html" title="trait std::ops::FnOnce">FnOnce</a>() -&gt; R&gt; <a class="trait" href="../../std/ops/trait.FnOnce.html" title="trait std::ops::FnOnce">FnOnce</a>&lt;<a class="primitive" href="../primitive.unit.html">()</a>&gt; for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;F&gt;</code><a href='#impl-FnOnce%3C()%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#304-310' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='../../std/ops/trait.FnOnce.html#associatedtype.Output' class="type">Output</a> = R</code></span></h4>
<div class='docblock'><p>The returned type after the call operator is used.</p>
</div><h4 id='method.call_once' class="method"><span id='call_once.v' class='invisible'><table class='table-display'><tbody><tr><td><code>extern &quot;rust-call&quot; fn <a href='../../std/ops/trait.FnOnce.html#tymethod.call_once' class='fnname'>call_once</a>(self, _args: <a class="primitive" href="../primitive.unit.html">()</a>) -&gt; R</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#307-309' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='stability'><div class='stab unstable'><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>fn_traits </code><a href="https://github.com/rust-lang/rust/issues/29625">#29625</a>)</div></div><div class='docblock'><p>Performs the call operation.</p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T:&nbsp;<a class="trait" href="../../std/fmt/trait.Debug.html" title="trait std::fmt::Debug">Debug</a>&gt; <a class="trait" href="../../std/fmt/trait.Debug.html" title="trait std::fmt::Debug">Debug</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt;</code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.16.0'>1.16.0</div><a class='srclink' href='../../src/std/panic.rs.html#313-319' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../std/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="../../std/fmt/struct.Formatter.html" title="struct std::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="../../std/fmt/type.Result.html" title="type std::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#314-318' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="../../std/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-Future' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;'a, F:&nbsp;<a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a>&gt; <a class="trait" href="../../std/future/trait.Future.html" title="trait std::future::Future">Future</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;F&gt;</code><a href='#impl-Future' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#322-334' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><span id='Output.t-1' class='invisible'><code>type <a href='../../std/future/trait.Future.html#associatedtype.Output' class="type">Output</a> = F::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a></code></span></h4>
<div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>futures_api </code><a href="https://github.com/rust-lang/rust/issues/50547">#50547</a>)</summary><p>futures in libcore are unstable</p>
</details></div></div><div class='docblock'><p>The result of the <code>Future</code>.</p>
</div><h4 id='method.poll' class="method"><span id='poll.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../std/future/trait.Future.html#tymethod.poll' class='fnname'>poll</a>(self: <a class="struct" href="../../std/mem/struct.PinMut.html" title="struct std::mem::PinMut">PinMut</a>&lt;Self&gt;, cx: &amp;mut <a class="struct" href="../../std/task/struct.Context.html" title="struct std::task::Context">Context</a>) -&gt; <a class="enum" href="../../std/task/enum.Poll.html" title="enum std::task::Poll">Poll</a>&lt;Self::<a class="type" href="../../std/future/trait.Future.html#associatedtype.Output" title="type std::future::Future::Output">Output</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/std/panic.rs.html#325-333' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='stability'><div class='stab unstable'><details><summary><span class=microscope>🔬</span> This is a nightly-only experimental API.  (<code>futures_api </code><a href="https://github.com/rust-lang/rust/issues/50547">#50547</a>)</summary><p>futures in libcore are unstable</p>
</details></div></div><div class='docblock'><p>Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. <a href="../../std/future/trait.Future.html#tymethod.poll">Read more</a></p>
</div></div></div>
                <h2 id='synthetic-implementations' class='small-section-header'>
                  Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
                </h2>
                <div id='synthetic-implementations-list'>
            <h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Send.html" title="trait std::marker::Send">Send</a>,&nbsp;</span></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl&lt;T&gt; <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a> for <a class="struct" href="../../std/panic/struct.AssertUnwindSafe.html" title="struct std::panic::AssertUnwindSafe">AssertUnwindSafe</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../std/marker/trait.Sync.html" title="trait std::marker::Sync">Sync</a>,&nbsp;</span></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "std";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>