mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 18:32:15 +00:00
98 lines
50 KiB
HTML
98 lines
50 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Error` struct in crate `failure`."><meta name="keywords" content="rust, rustlang, rust-lang, Error"><title>failure::Error - 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><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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">☰</div><a href='../failure/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Error</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.as_fail">as_fail</a><a href="#method.backtrace">backtrace</a><a href="#method.cause">cause</a><a href="#method.causes">causes</a><a href="#method.compat">compat</a><a href="#method.context">context</a><a href="#method.downcast">downcast</a><a href="#method.downcast_mut">downcast_mut</a><a href="#method.downcast_ref">downcast_ref</a><a href="#method.find_root_cause">find_root_cause</a><a href="#method.from_boxed_compat">from_boxed_compat</a><a href="#method.iter_causes">iter_causes</a><a href="#method.iter_chain">iter_chain</a><a href="#method.name">name</a><a href="#method.root_cause">root_cause</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-AsFail">AsFail</a><a href="#impl-AsRef%3Cdyn%20Fail%20+%20%27static%3E">AsRef<dyn Fail + 'static></a><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-From%3CError%3E">From<Error></a><a href="#impl-From%3CF%3E">From<F></a><a href="#impl-ResultExt%3CT%2C%20Error%3E">ResultExt<T, Error></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToString">ToString</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>failure</a></p><script>window.sidebarCurrent = {name: 'Error', 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"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/failure/error/mod.rs.html#29-31' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>failure</a>::<wbr><a class="struct" href=''>Error</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Error { /* fields omitted */ }</pre></div><div class='docblock'><p>The <code>Error</code> type, which can contain any failure.</p>
|
||
<p>Functions which accumulate many kinds of errors should return this type.
|
||
All failures can be converted into it, so functions which catch those
|
||
errors can be tried with <code>?</code> inside of a function that returns this kind
|
||
of error.</p>
|
||
<p>In addition to implementing <code>Debug</code> and <code>Display</code>, this type carries <code>Backtrace</code>
|
||
information, and can be downcast into the failure that underlies it for
|
||
more detailed inspection.</p>
|
||
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/failure/error/mod.rs.html#41-185' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_boxed_compat' class="method"><code id='from_boxed_compat.v'>pub fn <a href='#method.from_boxed_compat' class='fnname'>from_boxed_compat</a>(<br> err: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static><br>) -> <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#63-65' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an <code>Error</code> from <code>Box<std::error::Error></code>.</p>
|
||
<p>This method is useful for comparability with code,
|
||
which does not use the <code>Fail</code> trait.</p>
|
||
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span> <span class="kw">as</span> <span class="ident">StdError</span>;
|
||
<span class="kw">use</span> <span class="ident">failure</span>::<span class="ident">Error</span>;
|
||
|
||
<span class="kw">fn</span> <span class="ident">app_fn</span>() <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">i32</span>, <span class="ident">Error</span><span class="op">></span> {
|
||
<span class="kw">let</span> <span class="ident">x</span> <span class="op">=</span> <span class="ident">library_fn</span>().<span class="ident">map_err</span>(<span class="ident">Error</span>::<span class="ident">from_boxed_compat</span>)<span class="question-mark">?</span>;
|
||
<span class="prelude-val">Ok</span>(<span class="ident">x</span> <span class="op">*</span> <span class="number">2</span>)
|
||
}
|
||
|
||
<span class="kw">fn</span> <span class="ident">library_fn</span>() <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="ident">i32</span>, <span class="ident">Box</span><span class="op"><</span><span class="ident">StdError</span> <span class="op">+</span> <span class="ident">Sync</span> <span class="op">+</span> <span class="ident">Send</span> <span class="op">+</span> <span class="lifetime">'static</span><span class="op">></span><span class="op">></span> {
|
||
<span class="prelude-val">Ok</span>(<span class="number">92</span>)
|
||
}</pre></div>
|
||
</div><h4 id='method.as_fail' class="method"><code id='as_fail.v'>pub fn <a href='#method.as_fail' class='fnname'>as_fail</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#69-71' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a reference to the underlying failure that this <code>Error</code>
|
||
contains.</p>
|
||
</div><h4 id='method.name' class="method"><code id='name.v'>pub fn <a href='#method.name' class='fnname'>name</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code><a class='srclink' href='../src/failure/error/mod.rs.html#74-76' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the name of the underlying fail.</p>
|
||
</div><h4 id='method.cause' class="method"><code id='cause.v'>pub fn <a href='#method.cause' class='fnname'>cause</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab deprecated'>Deprecated since 0.1.2: <p>please use 'as_fail()' method instead</p>
|
||
</div></div><div class='docblock'><p>Returns a reference to the underlying cause of this <code>Error</code>. Unlike the
|
||
method on <code>Fail</code>, this does not return an <code>Option</code>. The <code>Error</code> type
|
||
always has an underlying failure.</p>
|
||
<p>This method has been deprecated in favor of the <a href="../failure/struct.Error.html#method.as_fail" title="Error::as_fail">Error::as_fail</a> method,
|
||
which does the same thing.</p>
|
||
</div><h4 id='method.backtrace' class="method"><code id='backtrace.v'>pub fn <a href='#method.backtrace' class='fnname'>backtrace</a>(&self) -> &<a class="struct" href="../failure/struct.Backtrace.html" title="struct failure::Backtrace">Backtrace</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#94-96' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets a reference to the <code>Backtrace</code> for this <code>Error</code>.</p>
|
||
<p>If the failure this wrapped carried a backtrace, that backtrace will
|
||
be returned. Otherwise, the backtrace will have been constructed at
|
||
the point that failure was cast into the <code>Error</code> type.</p>
|
||
</div><h4 id='method.context' class="method"><code id='context.v'>pub fn <a href='#method.context' class='fnname'>context</a><D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static>(<br> self, <br> context: D<br>) -> <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a><D></code><a class='srclink' href='../src/failure/error/mod.rs.html#111-113' title='goto source code'>[src]</a></h4><div class='docblock'><p>Provides context for this <code>Error</code>.</p>
|
||
<p>This can provide additional information about this error, appropriate
|
||
to the semantics of the current layer. That is, if you have a
|
||
lower-level error, such as an IO error, you can provide additional context
|
||
about what that error means in the context of your function. This
|
||
gives users of this function more information about what has gone
|
||
wrong.</p>
|
||
<p>This takes any type that implements <code>Display</code>, as well as
|
||
<code>Send</code>/<code>Sync</code>/<code>'static</code>. In practice, this means it can take a <code>String</code>
|
||
or a string literal, or a failure, or some other custom context-carrying
|
||
type.</p>
|
||
</div><h4 id='method.compat' class="method"><code id='compat.v'>pub fn <a href='#method.compat' class='fnname'>compat</a>(self) -> <a class="struct" href="../failure/struct.Compat.html" title="struct failure::Compat">Compat</a><<a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>></code><a class='srclink' href='../src/failure/error/mod.rs.html#120-122' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wraps <code>Error</code> in a compatibility type.</p>
|
||
<p>This type implements the <code>Error</code> trait from <code>std::error</code>. If you need
|
||
to pass failure's <code>Error</code> to an interface that takes any <code>Error</code>, you
|
||
can use this method to get a compatible type.</p>
|
||
</div><h4 id='method.downcast' class="method"><code id='downcast.v'>pub fn <a href='#method.downcast' class='fnname'>downcast</a><T: <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>></code><a class='srclink' href='../src/failure/error/mod.rs.html#130-132' title='goto source code'>[src]</a></h4><div class='docblock'><p>Attempts to downcast this <code>Error</code> to a particular <code>Fail</code> type.</p>
|
||
<p>This downcasts by value, returning an owned <code>T</code> if the underlying
|
||
failure is of the type <code>T</code>. For this reason it returns a <code>Result</code> - in
|
||
the case that the underlying error is of a different type, the
|
||
original <code>Error</code> is returned.</p>
|
||
</div><h4 id='method.find_root_cause' class="method"><code id='find_root_cause.v'>pub fn <a href='#method.find_root_cause' class='fnname'>find_root_cause</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#136-138' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the "root cause" of this error - the last value in the
|
||
cause chain which does not return an underlying <code>cause</code>.</p>
|
||
</div><h4 id='method.iter_causes' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></h3><code class="content"><span class="where fmt-newline">impl<'f> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &'f dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>;</span></code></div></div><code id='iter_causes.v'>pub fn <a href='#method.iter_causes' class='fnname'>iter_causes</a>(&self) -> <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#144-146' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a iterator over the causes of this error with the cause
|
||
of the fail as the first item and the <code>root_cause</code> as the final item.</p>
|
||
<p>Use <code>iter_chain</code> to also include the fail of this error itself.</p>
|
||
</div><h4 id='method.iter_chain' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></h3><code class="content"><span class="where fmt-newline">impl<'f> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &'f dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>;</span></code></div></div><code id='iter_chain.v'>pub fn <a href='#method.iter_chain' class='fnname'>iter_chain</a>(&self) -> <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#154-156' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a iterator over all fails up the chain from the current
|
||
as the first item up to the <code>root_cause</code> as the final item.</p>
|
||
<p>This means that the chain also includes the fail itself which
|
||
means that it does <em>not</em> start with <code>cause</code>. To skip the outermost
|
||
fail use <code>iter_causes</code> instead.</p>
|
||
</div><h4 id='method.downcast_ref' class="method"><code id='downcast_ref.v'>pub fn <a href='#method.downcast_ref' class='fnname'>downcast_ref</a><T: <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T></code><a class='srclink' href='../src/failure/error/mod.rs.html#162-164' title='goto source code'>[src]</a></h4><div class='docblock'><p>Attempts to downcast this <code>Error</code> to a particular <code>Fail</code> type by
|
||
reference.</p>
|
||
<p>If the underlying error is not of type <code>T</code>, this will return <code>None</code>.</p>
|
||
</div><h4 id='method.downcast_mut' class="method"><code id='downcast_mut.v'>pub fn <a href='#method.downcast_mut' class='fnname'>downcast_mut</a><T: <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T></code><a class='srclink' href='../src/failure/error/mod.rs.html#170-172' title='goto source code'>[src]</a></h4><div class='docblock'><p>Attempts to downcast this <code>Error</code> to a particular <code>Fail</code> type by
|
||
mutable reference.</p>
|
||
<p>If the underlying error is not of type <code>T</code>, this will return <code>None</code>.</p>
|
||
</div><h4 id='method.root_cause' class="method"><code id='root_cause.v'>pub fn <a href='#method.root_cause' class='fnname'>root_cause</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#176-178' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab deprecated'>Deprecated since 0.1.2: <p>please use the 'find_root_cause()' method instead</p>
|
||
</div></div><div class='docblock'><p>Deprecated alias to <code>find_root_cause</code>.</p>
|
||
</div><h4 id='method.causes' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></h3><code class="content"><span class="where fmt-newline">impl<'f> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a><'f></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = &'f dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>;</span></code></div></div><code id='causes.v'>pub fn <a href='#method.causes' class='fnname'>causes</a>(&self) -> <a class="struct" href="../failure/struct.Causes.html" title="struct failure::Causes">Causes</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#182-184' title='goto source code'>[src]</a></h4><div class='stability'><div class='stab deprecated'>Deprecated since 0.1.2: <p>please use the 'iter_chain()' method instead</p>
|
||
</div></div><div class='docblock'><p>Deprecated alias to <code>iter_causes</code>.</p>
|
||
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-AsFail' class='impl'><code class='in-band'>impl <a class="trait" href="../failure/trait.AsFail.html" title="trait failure::AsFail">AsFail</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-AsFail' class='anchor'></a><a class='srclink' href='../src/failure/as_fail.rs.html#32-36' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.as_fail-1' class="method hidden"><code id='as_fail.v-1'>fn <a href='../failure/trait.AsFail.html#tymethod.as_fail' class='fnname'>as_fail</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/as_fail.rs.html#33-35' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts a reference to <code>Self</code> into a dynamic trait object of <code>Fail</code>.</p>
|
||
</div></div><h3 id='impl-ResultExt%3CT%2C%20Error%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../failure/trait.ResultExt.html" title="trait failure::ResultExt">ResultExt</a><T, <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>></code><a href='#impl-ResultExt%3CT%2C%20Error%3E' class='anchor'></a><a class='srclink' href='../src/failure/result_ext.rs.html#182-202' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.compat-1' class="method hidden"><code id='compat.v-1'>fn <a href='../failure/trait.ResultExt.html#tymethod.compat' class='fnname'>compat</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="../failure/struct.Compat.html" title="struct failure::Compat">Compat</a><<a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>>></code><a class='srclink' href='../src/failure/result_ext.rs.html#183-185' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Wraps the error in <code>Compat</code> to make it compatible with older error handling APIs that expect <code>std::error::Error</code>. <a href="../failure/trait.ResultExt.html#tymethod.compat">Read more</a></p>
|
||
</div><h4 id='method.context-1' class="method hidden"><code id='context.v-1'>fn <a href='../failure/trait.ResultExt.html#tymethod.context' class='fnname'>context</a><D>(self, context: D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a><D>> <span class="where fmt-newline">where<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static, </span></code><a class='srclink' href='../src/failure/result_ext.rs.html#187-191' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Wraps the error type in a context type. <a href="../failure/trait.ResultExt.html#tymethod.context">Read more</a></p>
|
||
</div><h4 id='method.with_context' class="method hidden"><code id='with_context.v'>fn <a href='../failure/trait.ResultExt.html#tymethod.with_context' class='fnname'>with_context</a><F, D>(self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="../failure/struct.Context.html" title="struct failure::Context">Context</a><D>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&<a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>) -> D,<br> D: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static, </span></code><a class='srclink' href='../src/failure/result_ext.rs.html#193-201' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Wraps the error type in a context type generated by looking at the error value. <a href="../failure/trait.ResultExt.html#tymethod.with_context">Read more</a></p>
|
||
</div></div><h3 id='impl-AsRef%3Cdyn%20Fail%20+%20%27static%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a> + 'static> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-AsRef%3Cdyn%20Fail%20+%20%27static%3E' class='anchor'></a><a class='srclink' href='../src/failure/error/mod.rs.html#204-208' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.as_ref' class="method hidden"><code id='as_ref.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref' class='fnname'>as_ref</a>(&self) -> &dyn <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#205-207' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-From%3CError%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a>></code><a href='#impl-From%3CError%3E' class='anchor'></a><a class='srclink' href='../src/failure/compat.rs.html#42-46' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(error: <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a>></code><a class='srclink' href='../src/failure/compat.rs.html#43-45' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-From%3CError%3E-1' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>></code><a href='#impl-From%3CError%3E-1' class='anchor'></a><a class='srclink' href='../src/failure/compat.rs.html#48-52' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-1' class="method hidden"><code id='from.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(error: <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>></code><a class='srclink' href='../src/failure/compat.rs.html#49-51' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-From%3CF%3E' class='impl'><code class='in-band'>impl<F: <a class="trait" href="../failure/trait.Fail.html" title="trait failure::Fail">Fail</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><F> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-From%3CF%3E' class='anchor'></a><a class='srclink' href='../src/failure/error/mod.rs.html#33-39' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-2' class="method hidden"><code id='from.v-2'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(failure: F) -> <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#34-38' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/failure/error/mod.rs.html#193-202' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#194-201' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-Display' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-Display' class='anchor'></a><a class='srclink' href='../src/failure/error/mod.rs.html#187-191' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt-1' class="method hidden"><code id='fmt.v-1'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/failure/error/mod.rs.html#188-190' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">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-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../failure/struct.Error.html" title="struct failure::Error">Error</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-ToString' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-ToString' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2134-2144' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.to_string' class="method hidden"><code id='to_string.v'>default fn <a href='https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string' class='fnname'>to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2136-2143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
|
||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#552-554' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from-3' class="method hidden"><code id='from.v-3'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></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>⏎</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 = "failure";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |