<!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="An owned version of `Entered`, a guard representing a span which has been entered and is currently executing."><title>EnteredSpan in tracing::span - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-ac92e1bbe349e143.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="tracing"data-themes=""data-resource-suffix=""data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)"data-channel="1.76.0"data-search-js="search-2b6ce74ff89ae146.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-305769736d49e732.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.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="logo-container"href="../../tracing/index.html"><imgsrc="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png"alt=""></a></nav><navclass="sidebar"><divclass="sidebar-crate"><aclass="logo-container"href="../../tracing/index.html"><imgsrc="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png"alt="logo"></a><h2><ahref="../../tracing/index.html">tracing</a><spanclass="version">0.1.40</span></h2></div><h2class="location"><ahref="#">EnteredSpan</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.exit">exit</a></li><li><ahref="#method.id">id</a></li></ul><h3><ahref="#deref-methods-Span">Methods from Deref<Target=Span></a></h3><ulclass="block deref-methods"><li><ahref="#method.enter">enter</a></li><li><ahref="#method.field">field</a></li><li><ahref="#method.follows_from">follows_from</a></li><li><ahref="#method.has_field">has_field</a></li><li><ahref="#method.id-1">id</a></li><li><ahref="#method.in_scope">in_scope</a></li><li><ahref="#method.is_disabled">is_disabled</a></li><li><ahref="#method.is_none">is_none</a></li><li><ahref="#method.metadata">metadata</a></li><li><ahref="#method.record">record</a></li><li><ahref="#method.record_all">record_all</a></li><li><ahref="#method.with_subscriber">with_subscriber</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block trait-implementation"><li><ahref="#impl-Debug-for-EnteredSpan">Debug</a></li><li><ahref="#impl-Deref-for-EnteredSpan">Deref</a></li><li><ahref="#impl-Drop-for-EnteredSpan">Drop</a></li><li><ahref="#impl-From%3C%26EnteredSpan%3E-for-Option%3C%26Id
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../tracing/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../index.html">tracing</a>::<wbr><ahref="index.html">span</a>::<wbr><aclass="struct"href="#">EnteredSpan</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/tracing/span.rs.html#401-411">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct EnteredSpan { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>An owned version of <ahref="struct.Entered.html"title="struct tracing::span::Entered"><code>Entered</code></a>, a guard representing a span which has been
entered and is currently executing.</p>
<p>When the guard is dropped, the span will be exited.</p>
<p>This is returned by the <ahref="../struct.Span.html#method.entered"title="method tracing::Span::entered"><code>Span::entered</code></a> function.</p>
</div></details><h2id="implementations"class="section-header">Implementations<ahref="#implementations"class="anchor">§</a></h2><divid="implementations-list"><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-EnteredSpan"class="impl"><aclass="src rightside"href="../../src/tracing/span.rs.html#1540-1554">source</a><ahref="#impl-EnteredSpan"class="anchor">§</a><h3class="code-header">impl <aclass="struct"href="struct.EnteredSpan.html"title="struct tracing::span::EnteredSpan">EnteredSpan</a></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.id"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1542-1544">source</a><h4class="code-header">pub fn <ahref="#method.id"class="fn">id</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.Id.html"title="struct tracing::span::Id">Id</a>></h4></section></summary><divclass="docblock"><p>Returns this span’s <code>Id</code>, if it is enabled.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.exit"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1548-1553">source</a><h4class="code-header">pub fn <ahref="#method.exit"class="fn">exit</a>(self) -><aclass="struct"href="../struct.Span.html"title="struct tracing::Span">Span</a></h4></section></summary><divclass="docblock"><p>Exits this span, returning the underlying <ahref="../struct.Span.html"title="struct tracing::Span"><code>Span</code></a>.</p>
</div></details></div></details></div><h2id="deref-methods-Span"class="section-header"><span>Methods from <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = <aclass="struct"href="../struct.Span.html"title="struct tracing::Span">Span</a>></span><ahref="#deref-methods-Span"class="anchor">§</a></h2><divid="deref-methods-Span-1"class="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.enter"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#785-788">source</a><h4class="code-header">pub fn <ahref="#method.enter"class="fn">enter</a>(&self) -><aclass="struct"href="struct.Entered.html"title="struct tracing::span::Entered">Entered</a><'_></h4></section></summary><divclass="docblock"><p>Enters this span, returning a guard that will exit the span when dropped.</p>
<p>If this span is enabled by the current subscriber, then this function will
call <ahref="../trait.Subscriber.html#tymethod.enter"title="method tracing::Subscriber::enter"><code>Subscriber::enter</code></a> with the span’s <ahref="struct.Id.html"title="struct tracing::span::Id"><code>Id</code></a>, and dropping the guard
will call <ahref="../trait.Subscriber.html#tymethod.exit"title="method tracing::Subscriber::exit"><code>Subscriber::exit</code></a>. If the span is disabled, this does
<p><strong>Warning</strong>: in asynchronous code that uses <ahref="https://rust-lang.github.io/async-book/01_getting_started/04_async_await_primer.html">async/await syntax</a>,
<code>Span::enter</code> should be used very carefully or avoided entirely. Holding
the drop guard returned by <code>Span::enter</code> across <code>.await</code> points will
<p>The drop guard returned by <code>Span::enter</code> exits the span when it is
dropped. When an async function or async block yields at an <code>.await</code>
point, the current scope is <em>exited</em>, but values in that scope are
<strong>not</strong> dropped (because the async block will eventually resume
execution from that await point). This means that <em>another</em> task will
begin executing while <em>remaining</em> in the entered span. This results in
an incorrect trace.</p>
<p>Instead of using <code>Span::enter</code> in asynchronous code, prefer the
following:</p>
<ul>
<li>
<p>To enter a span for a synchronous section of code within an async
block or function, prefer <ahref="../struct.Span.html#method.in_scope"title="method tracing::Span::in_scope"><code>Span::in_scope</code></a>. Since <code>in_scope</code> takes a
synchronous closure and exits the span when the closure returns, the
span will always be exited before the next await point. For example:</p>
<p>For instrumenting asynchronous code, <code>tracing</code> provides the
<ahref="../trait.Instrument.html"title="trait tracing::Instrument"><code>Future::instrument</code> combinator</a> for
attaching a span to a future (async function or block). This will
enter the span <em>every</em> time the future is polled, and exit it whenever
the future yields.</p>
<p><code>Instrument</code> can be used with an async block inside an async function:</p>
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="kw">use </span>tracing::Instrument;
<spanclass="comment">//more asynchronous code inside the span...
</span>}
<spanclass="comment">// instrument the async block with the span...
</span>.instrument(span)
<spanclass="comment">// ...and await it.
</span>.<spanclass="kw">await
</span>}</code></pre></div>
<p>It can also be used to instrument calls to async functions at the
callsite:</p>
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="kw">use </span>tracing::Instrument;
<p>The <ahref="../attr.instrument.html"title="attr tracing::instrument"><code>#[instrument]</code> attribute macro</a> can automatically generate
correct code when used on an async function:</p>
<divclass="example-wrap ignore"><ahref="#"class="tooltip"title="This example is not tested">ⓘ</a><preclass="rust rust-example-rendered"><code><spanclass="attr">#[tracing::instrument(level = <spanclass="string">"info"</span>)]
<spanclass="comment">// this event occurs inside the span.
</span><spanclass="macro">info!</span>(<spanclass="string">"i'm in the span!"</span>);
<spanclass="comment">// exiting the scope drops the guard, exiting the span.
</span>}
<spanclass="comment">// this event is not inside the span.
</span><spanclass="macro">info!</span>(<spanclass="string">"i'm outside the span!"</span>)</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.in_scope"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1100-1103">source</a><h4class="code-header">pub fn <ahref="#method.in_scope"class="fn">in_scope</a><F: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>() -> T, T>(&self, f: F) -> T</h4></section></summary><divclass="docblock"><p>Executes the given function in the context of this span.</p>
<p>If this span is enabled, then this function enters the span, invokes <code>f</code>
and then exits the span. If the span is disabled, <code>f</code> will still be
invoked, but in the context of the currently-executing span (if there is
one).</p>
<p>Returns the result of evaluating <code>f</code>.</p>
Q: <aclass="trait"href="../field/trait.AsField.html"title="trait tracing::field::AsField">AsField</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass="docblock"><p>Returns a <ahref="../field/struct.Field.html"title="struct tracing::field::Field"><code>Field</code></a> for the field with the
Q: <aclass="trait"href="../field/trait.AsField.html"title="trait tracing::field::AsField">AsField</a> + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><divclass="docblock"><p>Returns true if this <code>Span</code> has a field for the given
<ahref="../field/struct.Field.html"title="struct tracing::field::Field"><code>Field</code></a> or field name.</p>
V: <aclass="trait"href="../trait.Value.html"title="trait tracing::Value">Value</a>,</div></h4></section></summary><divclass="docblock"><p>Records that the field described by <code>field</code> has the value <code>value</code>.</p>
<p>This may be used with <ahref="../field/struct.Empty.html"title="struct tracing::field::Empty"><code>field::Empty</code></a> to declare fields whose values
are not known when the span is created, and record them later:</p>
<spanclass="comment">// Instead, all fields that may be recorded after span creation should be declared up front,
// using field::Empty when a value is not known, as we did for `parting`.
// This `record` call will indeed replace field::Empty with "you will be remembered".
</span>span.record(<spanclass="string">"parting"</span>, <spanclass="string">"you will be remembered"</span>);</code></pre></div>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.record_all"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1213-1235">source</a><h4class="code-header">pub fn <ahref="#method.record_all"class="fn">record_all</a>(&self, values: &<aclass="struct"href="../field/struct.ValueSet.html"title="struct tracing::field::ValueSet">ValueSet</a><'_>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a></h4></section></summary><divclass="docblock"><p>Records all the fields in the provided <code>ValueSet</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_disabled"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1244-1246">source</a><h4class="code-header">pub fn <ahref="#method.is_disabled"class="fn">is_disabled</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if this span was disabled by the subscriber and does not
exist.</p>
<p>See also <ahref="../struct.Span.html#method.is_none"title="method tracing::Span::is_none"><code>is_none</code></a>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.is_none"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1259-1261">source</a><h4class="code-header">pub fn <ahref="#method.is_none"class="fn">is_none</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Returns <code>true</code> if this span was constructed by <ahref="../struct.Span.html#method.none"title="associated function tracing::Span::none"><code>Span::none</code></a> and is
empty.</p>
<p>If <code>is_none</code> returns <code>true</code> for a given span, then <ahref="../struct.Span.html#method.is_disabled"title="method tracing::Span::is_disabled"><code>is_disabled</code></a> will
also return <code>true</code>. However, when a span is disabled by the subscriber
rather than constructed by <code>Span::none</code>, this method will return
<code>false</code>, while <code>is_disabled</code> will return <code>true</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.follows_from"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1310-1317">source</a><h4class="code-header">pub fn <ahref="#method.follows_from"class="fn">follows_from</a>(&self, from: impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.Id.html"title="struct tracing::span::Id">Id</a>>>) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a></h4></section></summary><divclass="docblock"><p>Indicates that the span with the given ID has an indirect causal
relationship with this span.</p>
<p>This relationship differs somewhat from the parent-child relationship: a
span may have any number of prior spans, rather than a single one; and
spans are not considered to be executing <em>inside</em> of the spans they
follow from. This means that a span may close even if subsequent spans
that follow from it are still open, and time spent inside of a
subsequent span should not be included in the time its precedents were
executing. This is used to model causal relationships such as when a
single future spawns several related background tasks, et cetera.</p>
<p>If this span is disabled, or the resulting follows-from relationship
would be invalid, this function will do nothing.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.id-1"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1320-1322">source</a><h4class="code-header">pub fn <ahref="#method.id-1"class="fn">id</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.Id.html"title="struct tracing::span::Id">Id</a>></h4></section></summary><divclass="docblock"><p>Returns this span’s <code>Id</code>, if it is enabled.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.metadata"class="method"><aclass="src rightside"href="../../src/tracing/span.rs.html#1325-1327">source</a><h4class="code-header">pub fn <ahref="#method.metadata"class="fn">metadata</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'static <aclass="struct"href="../struct.Metadata.html"title="struct tracing::Metadata">Metadata</a><'static>></h4></section></summary><divclass="docblock"><p>Returns this span’s <code>Metadata</code>, if it is enabled.</p>
f: impl <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html"title="trait core::ops::function::FnOnce">FnOnce</a>((&<aclass="struct"href="struct.Id.html"title="struct tracing::span::Id">Id</a>, &<aclass="struct"href="../struct.Dispatch.html"title="struct tracing::Dispatch">Dispatch</a>)) -> T
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><T></h4></section></summary><divclass="docblock"><p>Invokes a function with a reference to this span’s ID and subscriber.</p>
<p>if this span is enabled, the provided function is called, and the result is returned.
If the span is disabled, the function is not called, and this method returns <code>None</code>
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><ahref="#impl-From%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from-2"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#766">source</a><ahref="#method.from-2"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from"class="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-Instrument-for-T"class="impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#325">source</a><ahref="#impl-Instrument-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="../trait.Instrument.html"title="trait tracing::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#86-91">source</a><ahref="#method.instrument"class="anchor">§</a><h4class="code-header">fn <ahref="../trait.Instrument.html#method.instrument"class="fn">instrument</a>(self, span: <aclass="struct"href="../struct.Span.html"title="struct tracing::Span">Span</a>) -><aclass="struct"href="../instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self><ahref="#"class="tooltip"data-notable-ty="Instrumented<Self>">ⓘ</a></h4></section></summary><divclass='docblock'>Instruments this type with the provided <ahref="../struct.Span.html"title="struct tracing::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <ahref="../trait.Instrument.html#method.instrument">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#128-130">source</a><ahref="#method.in_current_span"class="anchor">§</a><h4class="code-header">fn <ahref="../trait.Instrument.html#method.in_current_span"class="fn">in_current_span</a>(self) -><aclass="struct"href="../instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self><ahref="#"class="tooltip"data-notable-ty="Instrumented<Self>">ⓘ</a></h4></section></summary><divclass='docblock'>Instruments this type with the <ahref="../struct.Span.html#method.current"title="associated function tracing::Span::current">current</a><ahref="../struct.Span.html"title="struct tracing::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <ahref="../trait.Instrument.html#method.in_current_span">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#747-749">source</a><ahref="#impl-Into%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<p>That is, this conversion is whatever the implementation of
<code><ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#803-805">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></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 <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></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"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#810">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#788-790">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></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 <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></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"><aclass="src rightside"href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#795">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-WithSubscriber-for-T"class="impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#393">source</a><ahref="#impl-WithSubscriber-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="../instrument/trait.WithSubscriber.html"title="trait tracing::instrument::WithSubscriber">WithSubscriber</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_subscriber-1"class="method trait-impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#176-184">source</a><ahref="#method.with_subscriber-1"class="anchor">§</a><h4class="code-header">fn <ahref="../instrument/trait.WithSubscriber.html#method.with_subscriber"class="fn">with_subscriber</a><S>(self, subscriber: S) -><aclass="struct"href="../instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self><ahref="#"class="tooltip"data-notable-ty="WithDispatch<Self>">ⓘ</a><divclass="where">where
S: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="../struct.Dispatch.html"title="struct tracing::Dispatch">Dispatch</a>>,</div></h4></section></summary><divclass='docblock'>Attaches the provided <ahref="../trait.Subscriber.html"title="trait tracing::Subscriber"><code>Subscriber</code></a> to this type, returning a
<ahref="../instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch"><code>WithDispatch</code></a> wrapper. <ahref="../instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.with_current_subscriber"class="method trait-impl"><aclass="src rightside"href="../../src/tracing/instrument.rs.html#228-233">source</a><ahref="#method.with_current_subscriber"class="anchor">§</a><h4class="code-header">fn <ahref="../instrument/trait.WithSubscriber.html#method.with_current_subscriber"class="fn">with_current_subscriber</a>(self) -><aclass="struct"href="../instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self><ahref="#"class="tooltip"data-notable-ty="WithDispatch<Self>">ⓘ</a></h4></section></summary><divclass='docblock'>Attaches the current <ahref="../dispatcher/index.html#setting-the-default-subscriber"title="mod tracing::dispatcher">default</a><ahref="../trait.Subscriber.html"title="trait tracing::Subscriber"><code>Subscriber</code></a> to this type, returning a