edlang/tracing_subscriber/layer/trait.Layer.html
2024-07-26 09:42:18 +00:00

349 lines
106 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="A composable handler for `tracing` events."><title>Layer in tracing_subscriber::layer - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_subscriber" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../tracing_subscriber/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../tracing_subscriber/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_subscriber/index.html">tracing_subscriber</a><span class="version">0.3.18</span></h2></div><h2 class="location"><a href="#">Layer</a></h2><div class="sidebar-elems"><section><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.and_then">and_then</a></li><li><a href="#method.boxed">boxed</a></li><li><a href="#method.enabled">enabled</a></li><li><a href="#method.event_enabled">event_enabled</a></li><li><a href="#method.on_close">on_close</a></li><li><a href="#method.on_enter">on_enter</a></li><li><a href="#method.on_event">on_event</a></li><li><a href="#method.on_exit">on_exit</a></li><li><a href="#method.on_follows_from">on_follows_from</a></li><li><a href="#method.on_id_change">on_id_change</a></li><li><a href="#method.on_layer">on_layer</a></li><li><a href="#method.on_new_span">on_new_span</a></li><li><a href="#method.on_record">on_record</a></li><li><a href="#method.on_register_dispatch">on_register_dispatch</a></li><li><a href="#method.register_callsite">register_callsite</a></li><li><a href="#method.with_filter">with_filter</a></li><li><a href="#method.with_subscriber">with_subscriber</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Layer%3CS%3E-for-Box%3CL%3E">Box&lt;L&gt;</a></li><li><a href="#impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E">Box&lt;dyn Layer&lt;S&gt; + Send + Sync&gt;</a></li><li><a href="#impl-Layer%3CS%3E-for-Option%3CL%3E">Option&lt;L&gt;</a></li><li><a href="#impl-Layer%3CS%3E-for-Vec%3CL%3E">Vec&lt;L&gt;</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E">Layer&lt;S&gt;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In tracing_subscriber::layer</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">tracing_subscriber</a>::<wbr><a href="index.html">layer</a>::<wbr><a class="trait" href="#">Layer</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/tracing_subscriber/layer/mod.rs.html#727-1251">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Layer&lt;S&gt;<div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,
Self: 'static,</div>{
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 17 methods</span></summary> // Provided methods
fn <a href="#method.on_register_dispatch" class="fn">on_register_dispatch</a>(&amp;self, subscriber: &amp;<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.register_callsite" class="fn">register_callsite</a>(
&amp;self,
metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;,
) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, _span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, _span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, _event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, _event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, _id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, _id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, _id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.on_id_change" class="fn">on_id_change</a>(&amp;self, _old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) { ... }
<span class="item-spacer"></span> fn <a href="#method.and_then" class="fn">and_then</a>&lt;L&gt;(self, layer: L) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;L, Self, S&gt;
<span class="where">where L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.with_subscriber" class="fn">with_subscriber</a>(self, inner: S) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;Self, S&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.with_filter" class="fn">with_filter</a>&lt;F&gt;(self, filter: F) -&gt; <a class="struct" href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered">Filtered</a>&lt;Self, F, S&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter">Filter</a>&lt;S&gt;</span> { ... }
<span class="item-spacer"></span> fn <a href="#method.boxed" class="fn">boxed</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt;
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a></span> { ... }
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A composable handler for <code>tracing</code> events.</p>
<p>A <code>Layer</code> implements a behavior for recording or collecting traces that can
be composed together with other <code>Layer</code>s to build a <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>. See the
<a href="index.html" title="mod tracing_subscriber::layer">module-level documentation</a> for details.</p>
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.on_register_dispatch" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#753-755">source</a><h4 class="code-header">fn <a href="#method.on_register_dispatch" class="fn">on_register_dispatch</a>(&amp;self, subscriber: &amp;<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>)</h4></section></summary><div class="docblock"><p>Performs late initialization when installing this layer as a
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>.</p>
<h6 id="avoiding-memory-leaks"><a class="doc-anchor" href="#avoiding-memory-leaks">§</a>Avoiding Memory Leaks</h6>
<p><code>Layer</code>s should not store the <a href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch"><code>Dispatch</code></a> pointing to the <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>
that they are a part of. Because the <code>Dispatch</code> owns the <code>Subscriber</code>,
storing the <code>Dispatch</code> within the <code>Subscriber</code> will create a reference
count cycle, preventing the <code>Dispatch</code> from ever being dropped.</p>
<p>Instead, when it is necessary to store a cyclical reference to the
<code>Dispatch</code> within a <code>Layer</code>, use <a href="../../tracing_core/dispatcher/struct.Dispatch.html#method.downgrade" title="method tracing_core::dispatcher::Dispatch::downgrade"><code>Dispatch::downgrade</code></a> to convert a
<code>Dispatch</code> into a <a href="../../tracing_core/dispatcher/struct.WeakDispatch.html" title="struct tracing_core::dispatcher::WeakDispatch"><code>WeakDispatch</code></a>. This type is analogous to
<a href="https://doc.rust-lang.org/1.80.0/alloc/sync/struct.Weak.html" title="struct alloc::sync::Weak"><code>std::sync::Weak</code></a>, and does not create a reference count cycle. A
<a href="../../tracing_core/dispatcher/struct.WeakDispatch.html" title="struct tracing_core::dispatcher::WeakDispatch"><code>WeakDispatch</code></a> can be stored within a subscriber without causing a
memory leak, and can be <a href="../../tracing_core/dispatcher/struct.WeakDispatch.html#method.upgrade" title="method tracing_core::dispatcher::WeakDispatch::upgrade">upgraded</a> into a <code>Dispatch</code> temporarily when
the <code>Dispatch</code> must be accessed by the subscriber.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_layer" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#784-786">source</a><h4 class="code-header">fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section></summary><div class="docblock"><p>Performs late initialization when attaching a <code>Layer</code> to a
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>.</p>
<p>This is a callback that is called when the <code>Layer</code> is added to a
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a> (e.g. in <a href="trait.Layer.html#method.with_subscriber" title="method tracing_subscriber::layer::Layer::with_subscriber"><code>Layer::with_subscriber</code></a> and
<a href="trait.SubscriberExt.html#method.with" title="method tracing_subscriber::layer::SubscriberExt::with"><code>SubscriberExt::with</code></a>). Since this can only occur before the
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a> has been set as the default, both the <code>Layer</code> and
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a> are passed to this method <em>mutably</em>. This gives the
<code>Layer</code> the opportunity to set any of its own fields with values
recieved by method calls on the <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>.</p>
<p>For example, <a href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered"><code>Filtered</code></a> layers implement <code>on_layer</code> to call the
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>s <a href="../registry/trait.LookupSpan.html#method.register_filter" title="method tracing_subscriber::registry::LookupSpan::register_filter"><code>register_filter</code></a> method, and store the returned
<a href="../filter/struct.FilterId.html" title="struct tracing_subscriber::filter::FilterId"><code>FilterId</code></a> as a field.</p>
<p><strong>Note</strong> In most cases, <code>Layer</code> implementations will not need to
implement this method. However, in cases where a type implementing
<code>Layer</code> wraps one or more other types that implement <code>Layer</code>, like the
<a href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered"><code>Layered</code></a> and <a href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered"><code>Filtered</code></a> types in this crate, that type MUST ensure
that the inner <code>Layer</code>s <code>on_layer</code> methods are called. Otherwise,
functionality that relies on <code>on_layer</code>, such as <a href="#per-layer-filtering">per-layer filtering</a>,
may not work correctly.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.register_callsite" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#828-834">source</a><h4 class="code-header">fn <a href="#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section></summary><div class="docblock"><p>Registers a new callsite with this layer, returning whether or not
the layer is interested in being notified about the callsite, similarly
to <a href="../../tracing_core/subscriber/trait.Subscriber.html#method.register_callsite" title="method tracing_core::subscriber::Subscriber::register_callsite"><code>Subscriber::register_callsite</code></a>.</p>
<p>By default, this returns <a href="../../tracing_core/subscriber/struct.Interest.html#method.always" title="associated function tracing_core::subscriber::Interest::always"><code>Interest::always()</code></a> if <a href="trait.Layer.html#method.enabled" title="method tracing_subscriber::layer::Layer::enabled"><code>self.enabled</code></a> returns
true, or <a href="../../tracing_core/subscriber/struct.Interest.html#method.never" title="associated function tracing_core::subscriber::Interest::never"><code>Interest::never()</code></a> if it returns false.</p>
<pre class="ignore" style="white-space:normal;font:inherit;">
<strong>Note</strong>: This method (and <a href="#method.enabled">
<code>Layer::enabled</code></a>) determine whether a span or event is
globally enabled, <em>not</em> whether the individual layer will be
notified about that span or event. This is intended to be used
by layers that implement filtering for the entire stack. Layers which do
not wish to be notified about certain spans or events but do not wish to
globally disable them should ignore those spans or events in their
<a href="#method.on_event"><code>on_event</code></a>,
<a href="#method.on_enter"><code>on_enter</code></a>,
<a href="#method.on_exit"><code>on_exit</code></a>, and other notification
methods.
</pre>
<p>See <a href="#filtering-with-layers">the trait-level documentation</a> for more information on filtering
with <code>Layer</code>s.</p>
<p>Layers may also implement this method to perform any behaviour that
should be run once per callsite. If the layer wishes to use
<code>register_callsite</code> for per-callsite behaviour, but does not want to
globally enable or disable those callsites, it should always return
<a href="../../tracing_core/subscriber/struct.Interest.html#method.always" title="associated function tracing_core::subscriber::Interest::always"><code>Interest::always()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.enabled" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#868-871">source</a><h4 class="code-header">fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if this layer is interested in a span or event with the
given <code>metadata</code> in the current <a href="struct.Context.html" title="struct tracing_subscriber::layer::Context"><code>Context</code></a>, similarly to
<a href="../../tracing_core/subscriber/trait.Subscriber.html#tymethod.enabled" title="method tracing_core::subscriber::Subscriber::enabled"><code>Subscriber::enabled</code></a>.</p>
<p>By default, this always returns <code>true</code>, allowing the wrapped subscriber
to choose to disable the span.</p>
<pre class="ignore" style="white-space:normal;font:inherit;">
<strong>Note</strong>: This method (and <a href="#method.register_callsite">
<code>Layer::register_callsite</code></a>) determine whether a span or event is
globally enabled, <em>not</em> whether the individual layer will be
notified about that span or event. This is intended to be used
by layers that implement filtering for the entire stack. Layers which do
not wish to be notified about certain spans or events but do not wish to
globally disable them should ignore those spans or events in their
<a href="#method.on_event"><code>on_event</code></a>,
<a href="#method.on_enter"><code>on_enter</code></a>,
<a href="#method.on_exit"><code>on_exit</code></a>, and other notification
methods.
</pre>
<p>See <a href="#filtering-with-layers">the trait-level documentation</a> for more information on filtering
with <code>Layer</code>s.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_new_span" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#875-877">source</a><h4 class="code-header">fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that a new span was constructed with the given
<code>Attributes</code> and <code>Id</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_record" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#892">source</a><h4 class="code-header">fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, _span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that a span with the given <code>Id</code> recorded the given
<code>values</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_follows_from" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#899">source</a><h4 class="code-header">fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, _span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that a span with the ID <code>span</code> recorded that it
follows from the span with the ID <code>follows</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.event_enabled" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#922-924">source</a><h4 class="code-header">fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, _event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Called before <a href="trait.Layer.html#method.on_event"><code>on_event</code></a>, to determine if <code>on_event</code> should be called.</p>
<div class="example-wrap" style="display:inline-block">
<pre class="ignore" style="white-space:normal;font:inherit;">
<p><strong>Note</strong>: This method determines whether an event is globally enabled,
<em>not</em> whether the individual <code>Layer</code> will be notified about the
event. This is intended to be used by <code>Layer</code>s that implement
filtering for the entire stack. <code>Layer</code>s which do not wish to be
notified about certain events but do not wish to globally disable them
should ignore those events in their <a href="trait.Layer.html#method.on_event">on_event</a>.</p>
<p></pre></div></p>
<p>See <a href="#filtering-with-layers">the trait-level documentation</a> for more information on filtering
with <code>Layer</code>s.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_event" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#927">source</a><h4 class="code-header">fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, _event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that an event has occurred.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_enter" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#930">source</a><h4 class="code-header">fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, _id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that a span with the given ID was entered.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_exit" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#933">source</a><h4 class="code-header">fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, _id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that the span with the given ID was exited.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_close" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#936">source</a><h4 class="code-header">fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, _id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that the span with the given ID has been closed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_id_change" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#940">source</a><h4 class="code-header">fn <a href="#method.on_id_change" class="fn">on_id_change</a>(&amp;self, _old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, _ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class="docblock"><p>Notifies this layer that a span ID has been cloned, and that the
subscriber returned a different ID.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.and_then" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1039-1046">source</a><h4 class="code-header">fn <a href="#method.and_then" class="fn">and_then</a>&lt;L&gt;(self, layer: L) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;L, Self, S&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Composes this layer around the given <code>Layer</code>, returning a <code>Layered</code>
struct implementing <code>Layer</code>.</p>
<p>The returned <code>Layer</code> will call the methods on this <code>Layer</code> and then
those of the new <code>Layer</code>, before calling the methods on the subscriber
it wraps. For example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>FooLayer {
<span class="comment">// ...
</span>}
<span class="kw">pub struct </span>BarLayer {
<span class="comment">// ...
</span>}
<span class="kw">pub struct </span>MySubscriber {
<span class="comment">// ...
</span>}
<span class="kw">impl</span>&lt;S: Subscriber&gt; Layer&lt;S&gt; <span class="kw">for </span>FooLayer {
<span class="comment">// ...
</span>}
<span class="kw">impl</span>&lt;S: Subscriber&gt; Layer&lt;S&gt; <span class="kw">for </span>BarLayer {
<span class="comment">// ...
</span>}
<span class="kw">let </span>subscriber = FooLayer::new()
.and_then(BarLayer::new())
.with_subscriber(MySubscriber::new());</code></pre></div>
<p>Multiple layers may be composed in this manner:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>BazLayer {
<span class="comment">// ...
</span>}
<span class="kw">impl</span>&lt;S: Subscriber&gt; Layer&lt;S&gt; <span class="kw">for </span>BazLayer {
<span class="comment">// ...
</span>}
<span class="kw">let </span>subscriber = FooLayer::new()
.and_then(BarLayer::new())
.and_then(BazLayer::new())
.with_subscriber(MySubscriber::new());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1091-1098">source</a><h4 class="code-header">fn <a href="#method.with_subscriber" class="fn">with_subscriber</a>(self, inner: S) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;Self, S&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Composes this <code>Layer</code> with the given <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>, returning a
<code>Layered</code> struct that implements <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>.</p>
<p>The returned <code>Layered</code> subscriber will call the methods on this <code>Layer</code>
and then those of the wrapped subscriber.</p>
<p>For example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>FooLayer {
<span class="comment">// ...
</span>}
<span class="kw">pub struct </span>MySubscriber {
<span class="comment">// ...
</span>}
<span class="kw">impl</span>&lt;S: Subscriber&gt; Layer&lt;S&gt; <span class="kw">for </span>FooLayer {
<span class="comment">// ...
</span>}
<span class="kw">let </span>subscriber = FooLayer::new()
.with_subscriber(MySubscriber::new());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.with_filter" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1110-1116">source</a><h4 class="code-header">fn <a href="#method.with_filter" class="fn">with_filter</a>&lt;F&gt;(self, filter: F) -&gt; <a class="struct" href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered">Filtered</a>&lt;Self, F, S&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter">Filter</a>&lt;S&gt;,</div></h4></section></summary><div class="docblock"><p>Combines <code>self</code> with a <a href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter"><code>Filter</code></a>, returning a <a href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered"><code>Filtered</code></a> layer.</p>
<p>The <a href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter"><code>Filter</code></a> will control which spans and events are enabled for
this layer. See <a href="index.html#per-layer-filtering" title="mod tracing_subscriber::layer">the trait-level documentation</a> for details on
per-layer filtering.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.boxed" class="method"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1234-1241">source</a><h4 class="code-header">fn <a href="#method.boxed" class="fn">boxed</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h4></section></summary><div class="docblock"><p>Erases the type of this <a href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer"><code>Layer</code></a>, returning a <a href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box"><code>Box</code></a>ed <code>dyn Layer</code> trait object.</p>
<p>This can be used when a function returns a <code>Layer</code> which may be of
one of several types, or when a <code>Layer</code> subscriber has a very long type
signature.</p>
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
<p>The following example will <em>not</em> compile, because the value assigned to
<code>log_layer</code> may have one of several different types:</p>
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile"></a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tracing_subscriber::{Layer, filter::LevelFilter, prelude::<span class="kw-2">*</span>};
<span class="kw">use </span>std::{path::PathBuf, fs::File, io};
<span class="doccomment">/// Configures whether logs are emitted to a file, to stdout, or to stderr.
</span><span class="kw">pub enum </span>LogConfig {
File(PathBuf),
Stdout,
Stderr,
}
<span class="kw">let </span>config = <span class="comment">// ...
// Depending on the config, construct a layer of one of several types.
</span><span class="kw">let </span>log_layer = <span class="kw">match </span>config {
<span class="comment">// If logging to a file, use a maximally-verbose configuration.
</span>LogConfig::File(path) =&gt; {
<span class="kw">let </span>file = File::create(path)<span class="question-mark">?</span>;
tracing_subscriber::fmt::layer()
.with_thread_ids(<span class="bool-val">true</span>)
.with_thread_names(<span class="bool-val">true</span>)
<span class="comment">// Selecting the JSON logging format changes the layer's
// type.
</span>.json()
.with_span_list(<span class="bool-val">true</span>)
<span class="comment">// Setting the writer to use our log file changes the
// layer's type again.
</span>.with_writer(file)
},
<span class="comment">// If logging to stdout, use a pretty, human-readable configuration.
</span>LogConfig::Stdout =&gt; tracing_subscriber::fmt::layer()
<span class="comment">// Selecting the "pretty" logging format changes the
// layer's type!
</span>.pretty()
.with_writer(io::stdout)
<span class="comment">// Add a filter based on the RUST_LOG environment variable;
// this changes the type too!
</span>.and_then(tracing_subscriber::EnvFilter::from_default_env()),
<span class="comment">// If logging to stdout, only log errors and warnings.
</span>LogConfig::Stderr =&gt; tracing_subscriber::fmt::layer()
<span class="comment">// Changing the writer changes the layer's type
</span>.with_writer(io::stderr)
<span class="comment">// Only log the `WARN` and `ERROR` levels. Adding a filter
// changes the layer's type to `Filtered&lt;LevelFilter, ...&gt;`.
</span>.with_filter(LevelFilter::WARN),
};
tracing_subscriber::registry()
.with(log_layer)
.init();</code></pre></div>
<p>However, adding a call to <code>.boxed()</code> after each match arm erases the
layers type, so this code <em>does</em> compile:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>log_layer = <span class="kw">match </span>config {
LogConfig::File(path) =&gt; {
<span class="kw">let </span>file = File::create(path)<span class="question-mark">?</span>;
tracing_subscriber::fmt::layer()
.with_thread_ids(<span class="bool-val">true</span>)
.with_thread_names(<span class="bool-val">true</span>)
.json()
.with_span_list(<span class="bool-val">true</span>)
.with_writer(file)
<span class="comment">// Erase the type by boxing the layer
</span>.boxed()
},
LogConfig::Stdout =&gt; tracing_subscriber::fmt::layer()
.pretty()
.with_writer(io::stdout)
.and_then(tracing_subscriber::EnvFilter::from_default_env())
<span class="comment">// Erase the type by boxing the layer
</span>.boxed(),
LogConfig::Stderr =&gt; tracing_subscriber::fmt::layer()
.with_writer(io::stderr)
.with_filter(LevelFilter::WARN)
<span class="comment">// Erase the type by boxing the layer
</span>.boxed(),
};
tracing_subscriber::registry()
.with(log_layer)
.init();</code></pre></div>
</div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1768-1773">source</a><a href="#impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;<div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.on_register_dispatch-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_register_dispatch-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_register_dispatch" class="fn">on_register_dispatch</a>(&amp;self, subscriber: &amp;<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>)</h4></section></summary><div class='docblock'>Performs late initialization when installing this layer as a
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>. <a href="trait.Layer.html#method.on_register_dispatch">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.on_layer-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_layer-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section></summary><div class='docblock'>Performs late initialization when attaching a <code>Layer</code> to a
<a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>. <a href="trait.Layer.html#method.on_layer">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.on_new_span-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_new_span-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that a new span was constructed with the given
<code>Attributes</code> and <code>Id</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.register_callsite-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.register_callsite-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section></summary><div class='docblock'>Registers a new callsite with this layer, returning whether or not
the layer is interested in being notified about the callsite, similarly
to <a href="../../tracing_core/subscriber/trait.Subscriber.html#method.register_callsite" title="method tracing_core::subscriber::Subscriber::register_callsite"><code>Subscriber::register_callsite</code></a>. <a href="trait.Layer.html#method.register_callsite">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.enabled-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.enabled-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Returns <code>true</code> if this layer is interested in a span or event with the
given <code>metadata</code> in the current <a href="struct.Context.html" title="struct tracing_subscriber::layer::Context"><code>Context</code></a>, similarly to
<a href="../../tracing_core/subscriber/trait.Subscriber.html#tymethod.enabled" title="method tracing_core::subscriber::Subscriber::enabled"><code>Subscriber::enabled</code></a>. <a href="trait.Layer.html#method.enabled">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.on_record-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_record-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_record" class="fn">on_record</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that a span with the given <code>Id</code> recorded the given
<code>values</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_follows_from-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_follows_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that a span with the ID <code>span</code> recorded that it
follows from the span with the ID <code>follows</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.event_enabled-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.event_enabled-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.event_enabled" class="fn">event_enabled</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Called before <a href="trait.Layer.html#method.on_event"><code>on_event</code></a>, to determine if <code>on_event</code> should be called.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_event-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_event-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_event" class="fn">on_event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that an event has occurred.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_enter-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_enter-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_enter" class="fn">on_enter</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that a span with the given ID was entered.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_exit-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_exit-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_exit" class="fn">on_exit</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that the span with the given ID was exited.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_close-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_close-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_close" class="fn">on_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that the span with the given ID has been closed.</div></details><details class="toggle method-toggle" open><summary><section id="method.on_id_change-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_id_change-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.on_id_change" class="fn">on_id_change</a>(&amp;self, old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></summary><div class='docblock'>Notifies this layer that a span ID has been cloned, and that the
subscriber returned a different ID.</div></details><details class="toggle method-toggle" open><summary><section id="method.and_then-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1039-1046">source</a><a href="#method.and_then-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.and_then" class="fn">and_then</a>&lt;L&gt;(self, layer: L) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;L, Self, S&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Composes this layer around the given <code>Layer</code>, returning a <code>Layered</code>
struct implementing <code>Layer</code>. <a href="trait.Layer.html#method.and_then">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_subscriber-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1091-1098">source</a><a href="#method.with_subscriber-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.with_subscriber" class="fn">with_subscriber</a>(self, inner: S) -&gt; <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;Self, S&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Composes this <code>Layer</code> with the given <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>, returning a
<code>Layered</code> struct that implements <a href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber"><code>Subscriber</code></a>. <a href="trait.Layer.html#method.with_subscriber">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_filter-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1110-1116">source</a><a href="#method.with_filter-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.with_filter" class="fn">with_filter</a>&lt;F&gt;(self, filter: F) -&gt; <a class="struct" href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered">Filtered</a>&lt;Self, F, S&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
F: <a class="trait" href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter">Filter</a>&lt;S&gt;,</div></h4></section></summary><div class='docblock'>Combines <code>self</code> with a <a href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter"><code>Filter</code></a>, returning a <a href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered"><code>Filtered</code></a> layer. <a href="trait.Layer.html#method.with_filter">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.boxed-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1234-1241">source</a><a href="#method.boxed-1" class="anchor">§</a><h4 class="code-header">fn <a href="trait.Layer.html#method.boxed" class="fn">boxed</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static&gt;<div class="where">where
Self: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h4></section></summary><div class='docblock'>Erases the type of this <a href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer"><code>Layer</code></a>, returning a <a href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box"><code>Box</code></a>ed <code>dyn Layer</code> trait object. <a href="trait.Layer.html#method.boxed">Read more</a></div></details></div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Layer%3CS%3E-for-Option%3CL%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1559-1673">source</a><a href="#impl-Layer%3CS%3E-for-Option%3CL%3E" class="anchor">§</a><h3 class="code-header">impl&lt;L, S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;L&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section></summary><div class="impl-items"><section id="method.on_layer-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1564-1568">source</a><a href="#method.on_layer-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section><section id="method.on_new_span-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1571-1575">source</a><a href="#method.on_new_span-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.register_callsite-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1578-1583">source</a><a href="#method.register_callsite-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section><section id="method.enabled-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1586-1591">source</a><a href="#method.enabled-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_record-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1606-1610">source</a><a href="#method.on_record-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_follows_from-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1613-1617">source</a><a href="#method.on_follows_from-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.event_enabled-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1620-1625">source</a><a href="#method.event_enabled-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_event-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1628-1632">source</a><a href="#method.on_event-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_enter-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1635-1639">source</a><a href="#method.on_enter-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_exit-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1642-1646">source</a><a href="#method.on_exit-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_close-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1649-1653">source</a><a href="#method.on_close-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_id_change-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1656-1660">source</a><a href="#method.on_id_change-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_id_change" class="fn">on_id_change</a>(&amp;self, old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Layer%3CS%3E-for-Box%3CL%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1760-1766">source</a><a href="#impl-Layer%3CS%3E-for-Box%3CL%3E" class="anchor">§</a><h3 class="code-header">impl&lt;L, S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;L&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section></summary><div class="impl-items"><section id="method.on_register_dispatch-2" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_register_dispatch-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_register_dispatch" class="fn">on_register_dispatch</a>(&amp;self, subscriber: &amp;<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>)</h4></section><section id="method.on_layer-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_layer-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section><section id="method.on_new_span-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_new_span-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.register_callsite-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.register_callsite-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section><section id="method.enabled-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.enabled-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_record-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_record-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_follows_from-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_follows_from-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.event_enabled-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.event_enabled-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_event-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_event-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_enter-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_enter-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_exit-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_exit-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_close-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_close-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_id_change-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1765">source</a><a href="#method.on_id_change-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_id_change" class="fn">on_id_change</a>(&amp;self, old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E-1" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1768-1773">source</a><a href="#impl-Layer%3CS%3E-for-Box%3Cdyn+Layer%3CS%3E+%2B+Send+%2B+Sync%3E-1" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;<div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section></summary><div class="impl-items"><section id="method.on_register_dispatch-3" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_register_dispatch-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_register_dispatch" class="fn">on_register_dispatch</a>(&amp;self, subscriber: &amp;<a class="struct" href="../../tracing_core/dispatcher/struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a>)</h4></section><section id="method.on_layer-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_layer-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section><section id="method.on_new_span-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_new_span-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.register_callsite-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.register_callsite-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section><section id="method.enabled-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.enabled-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_record-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_record-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_follows_from-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_follows_from-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.event_enabled-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.event_enabled-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_event-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_event-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_enter-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_enter-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_exit-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_exit-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_close-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_close-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_id_change-4" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1772">source</a><a href="#method.on_id_change-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_id_change" class="fn">on_id_change</a>(&amp;self, old: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, new: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Layer%3CS%3E-for-Vec%3CL%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1777-1892">source</a><a href="#impl-Layer%3CS%3E-for-Vec%3CL%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, L&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;L&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section></summary><div class="impl-items"><section id="method.on_layer-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1783-1787">source</a><a href="#method.on_layer-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_layer" class="fn">on_layer</a>(&amp;mut self, subscriber: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut S</a>)</h4></section><section id="method.register_callsite-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1789-1802">source</a><a href="#method.register_callsite-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.register_callsite" class="fn">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></h4></section><section id="method.enabled-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1804-1806">source</a><a href="#method.enabled-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.event_enabled-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1808-1810">source</a><a href="#method.event_enabled-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.event_enabled" class="fn">event_enabled</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.on_new_span-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1812-1816">source</a><a href="#method.on_new_span-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_new_span" class="fn">on_new_span</a>(&amp;self, attrs: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_record-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1832-1836">source</a><a href="#method.on_record-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_record" class="fn">on_record</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, values: &amp;<a class="struct" href="../../tracing_core/span/struct.Record.html" title="struct tracing_core::span::Record">Record</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_follows_from-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1838-1842">source</a><a href="#method.on_follows_from-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_follows_from" class="fn">on_follows_from</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, follows: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_event-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1844-1848">source</a><a href="#method.on_event-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_event" class="fn">on_event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/event/struct.Event.html" title="struct tracing_core::event::Event">Event</a>&lt;'_&gt;, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_enter-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1850-1854">source</a><a href="#method.on_enter-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_enter" class="fn">on_enter</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_exit-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1856-1860">source</a><a href="#method.on_exit-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_exit" class="fn">on_exit</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section><section id="method.on_close-5" class="method trait-impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1862-1866">source</a><a href="#method.on_close-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.on_close" class="fn">on_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>, ctx: <a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Layer%3CS%3E-for-Layer%3CL,+S%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/reload.rs.html#114-205">source</a><a href="#impl-Layer%3CS%3E-for-Layer%3CL,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;L, S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for tracing_subscriber::reload::<a class="struct" href="../reload/struct.Layer.html" title="struct tracing_subscriber::reload::Layer">Layer</a>&lt;L, S&gt;<div class="where">where
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section><section id="impl-Layer%3CS%3E-for-Targets" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/targets.rs.html#439-454">source</a><a href="#impl-Layer%3CS%3E-for-Targets" class="anchor">§</a><h3 class="code-header">impl&lt;S&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/targets/struct.Targets.html" title="struct tracing_subscriber::filter::targets::Targets">Targets</a><div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section><section id="impl-Layer%3CS%3E-for-Layered%3CA,+B,+S%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/layered.rs.html#241-383">source</a><a href="#impl-Layer%3CS%3E-for-Layered%3CA,+B,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, A, B&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="struct.Layered.html" title="struct tracing_subscriber::layer::Layered">Layered</a>&lt;A, B, S&gt;<div class="where">where
A: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
B: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section><section id="impl-Layer%3CS%3E-for-FilterFn%3CF%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/filter_fn.rs.html#324-340">source</a><a href="#impl-Layer%3CS%3E-for-FilterFn%3CF%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, F&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/struct.FilterFn.html" title="struct tracing_subscriber::filter::FilterFn">FilterFn</a>&lt;F&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section><section id="impl-Layer%3CS%3E-for-DynFilterFn%3CS,+F,+R%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/filter_fn.rs.html#643-660">source</a><a href="#impl-Layer%3CS%3E-for-DynFilterFn%3CS,+F,+R%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, F, R&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/struct.DynFilterFn.html" title="struct tracing_subscriber::filter::DynFilterFn">DynFilterFn</a>&lt;S, F, R&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'_&gt;, &amp;<a class="struct" href="struct.Context.html" title="struct tracing_subscriber::layer::Context">Context</a>&lt;'_, S&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a> + 'static,
R: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;'static <a class="struct" href="../../tracing_core/metadata/struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a>&lt;'static&gt;) -&gt; <a class="struct" href="../../tracing_core/subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a> + 'static,
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>,</div></h3></section><section id="impl-Layer%3CS%3E-for-Filtered%3CL,+F,+S%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/layer_filters/mod.rs.html#703-869">source</a><a href="#impl-Layer%3CS%3E-for-Filtered%3CL,+F,+S%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, L, F&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/struct.Filtered.html" title="struct tracing_subscriber::filter::Filtered">Filtered</a>&lt;L, F, S&gt;<div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a> + for&lt;'span&gt; <a class="trait" href="../registry/trait.LookupSpan.html" title="trait tracing_subscriber::registry::LookupSpan">LookupSpan</a>&lt;'span&gt; + 'static,
F: <a class="trait" href="trait.Filter.html" title="trait tracing_subscriber::layer::Filter">Filter</a>&lt;S&gt; + 'static,
L: <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt;,</div></h3></section><section id="impl-Layer%3CS%3E-for-Layer%3CS,+N,+E,+W%3E" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/fmt/fmt_layer.rs.html#804-1008">source</a><a href="#impl-Layer%3CS%3E-for-Layer%3CS,+N,+E,+W%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S, N, E, W&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for tracing_subscriber::fmt::<a class="struct" href="../fmt/struct.Layer.html" title="struct tracing_subscriber::fmt::Layer">Layer</a>&lt;S, N, E, W&gt;<div class="where">where
S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a> + for&lt;'a&gt; <a class="trait" href="../registry/trait.LookupSpan.html" title="trait tracing_subscriber::registry::LookupSpan">LookupSpan</a>&lt;'a&gt;,
N: for&lt;'writer&gt; <a class="trait" href="../fmt/trait.FormatFields.html" title="trait tracing_subscriber::fmt::FormatFields">FormatFields</a>&lt;'writer&gt; + 'static,
E: <a class="trait" href="../fmt/trait.FormatEvent.html" title="trait tracing_subscriber::fmt::FormatEvent">FormatEvent</a>&lt;S, N&gt; + 'static,
W: for&lt;'writer&gt; <a class="trait" href="../fmt/trait.MakeWriter.html" title="trait tracing_subscriber::fmt::MakeWriter">MakeWriter</a>&lt;'writer&gt; + 'static,</div></h3></section><section id="impl-Layer%3CS%3E-for-EnvFilter" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/env/mod.rs.html#642-682">source</a><a href="#impl-Layer%3CS%3E-for-EnvFilter" class="anchor">§</a><h3 class="code-header">impl&lt;S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/struct.EnvFilter.html" title="struct tracing_subscriber::filter::EnvFilter">EnvFilter</a></h3></section><section id="impl-Layer%3CS%3E-for-LevelFilter" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/filter/level.rs.html#11-27">source</a><a href="#impl-Layer%3CS%3E-for-LevelFilter" class="anchor">§</a><h3 class="code-header">impl&lt;S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="../filter/struct.LevelFilter.html" title="struct tracing_subscriber::filter::LevelFilter">LevelFilter</a></h3></section><section id="impl-Layer%3CS%3E-for-Identity" class="impl"><a class="src rightside" href="../../src/tracing_subscriber/layer/mod.rs.html#1902">source</a><a href="#impl-Layer%3CS%3E-for-Identity" class="anchor">§</a><h3 class="code-header">impl&lt;S: <a class="trait" href="../../tracing_core/subscriber/trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a>&gt; <a class="trait" href="trait.Layer.html" title="trait tracing_subscriber::layer::Layer">Layer</a>&lt;S&gt; for <a class="struct" href="struct.Identity.html" title="struct tracing_subscriber::layer::Identity">Identity</a></h3></section></div><script src="../../trait.impl/tracing_subscriber/layer/trait.Layer.js" data-ignore-extern-crates="tracing_core,alloc,core" async></script></section></div></main></body></html>