Auto Generated Documentation

This commit is contained in:
github-actions[bot]
2021-03-14 20:06:11 +00:00
parent fcf47cbac9
commit 799a22692f
11450 changed files with 65837 additions and 83717 deletions
@@ -1,7 +1,7 @@
<!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="Trait representing the functions required to collect trace data."><meta name="keywords" content="rust, rustlang, rust-lang, Subscriber"><title>tracing_core::subscriber::Subscriber - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Subscriber` trait in crate `tracing_core`."><meta name="keywords" content="rust, rustlang, rust-lang, Subscriber"><title>tracing_core::subscriber::Subscriber - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../tracing_core/index.html'><div class='logo-container'><img src='https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png' alt='logo'></div></a><p class="location">Trait Subscriber</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.event">event</a><a href="#tymethod.enter">enter</a><a href="#tymethod.new_span">new_span</a><a href="#tymethod.record">record</a><a href="#tymethod.record_follows_from">record_follows_from</a><a href="#tymethod.enabled">enabled</a><a href="#tymethod.exit">exit</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.max_level_hint">max_level_hint</a><a href="#method.register_callsite">register_callsite</a><a href="#method.clone_span">clone_span</a><a href="#method.drop_span">drop_span</a><a href="#method.try_close">try_close</a><a href="#method.current_span">current_span</a><a href="#method.downcast_raw">downcast_raw</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.downcast_ref">downcast_ref</a><a href="#method.is">is</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">subscriber</a></p><div id="sidebar-vars" data-name="Subscriber" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../index.html">tracing_core</a>::<wbr><a href="index.html">subscriber</a>::<wbr><a class="trait" href="">Subscriber</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#70-455" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Subscriber: 'static {
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../tracing_core/index.html'><div class='logo-container'><img src='https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png' alt='logo'></div></a><p class="location">Trait Subscriber</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.enabled">enabled</a><a href="#tymethod.enter">enter</a><a href="#tymethod.event">event</a><a href="#tymethod.exit">exit</a><a href="#tymethod.new_span">new_span</a><a href="#tymethod.record">record</a><a href="#tymethod.record_follows_from">record_follows_from</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.clone_span">clone_span</a><a href="#method.current_span">current_span</a><a href="#method.downcast_raw">downcast_raw</a><a href="#method.drop_span">drop_span</a><a href="#method.max_level_hint">max_level_hint</a><a href="#method.register_callsite">register_callsite</a><a href="#method.try_close">try_close</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.downcast_ref">downcast_ref</a><a href="#method.is">is</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">subscriber</a></p><script>window.sidebarCurrent = {name: "Subscriber", ty: "trait", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#70-455" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">tracing_core</a>::<wbr><a href="index.html">subscriber</a>::<wbr><a class="trait" href="">Subscriber</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Subscriber: 'static {
fn <a href="#tymethod.enabled" class="fnname">enabled</a>(&amp;self, metadata: &amp;<a class="struct" href="../../tracing_core/struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class="item-spacer"></div> fn <a href="#tymethod.new_span" class="fnname">new_span</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a>&lt;'_&gt;) -&gt; <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>;
<div class="item-spacer"></div> fn <a href="#tymethod.record" class="fnname">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;);
@@ -57,7 +57,7 @@ event may originate, and returns an <a href="struct.Interest.html"><code>Interes
not the subscriber wishes to see events or spans from that callsite. By
default, it calls <a href="trait.Subscriber.html#method.enabled"><code>enabled</code></a>, and returns <code>Interest::always()</code> if
<code>enabled</code> returns true, or <code>Interest::never()</code> if enabled returns false.
However, if the subscribers interest can change dynamically at runtime,
However, if the subscriber's interest can change dynamically at runtime,
it may want to override this function to return <code>Interest::sometimes()</code>.
Additionally, subscribers which wish to perform a behaviour once for each
callsite, such as allocating storage for data related to that callsite,
@@ -78,7 +78,7 @@ callsite is registered. The result is used to determine if the subscriber
is always <a href="struct.Interest.html">interested</a> or never interested in that callsite. This is intended
primarily as an optimization, so that expensive filters (such as those
involving string search, et cetera) need not be re-evaluated.</p>
<p>However, if the subscribers interest in a particular span or event may
<p>However, if the subscriber's interest in a particular span or event may
change, or depends on contexts only determined dynamically at runtime,
then the <code>register_callsite</code> method should be overridden to return
<a href="struct.Interest.html#method.sometimes"><code>Interest::sometimes</code></a>. In that case, this function will be called every
@@ -87,7 +87,7 @@ time that span or event occurs.</p>
span being constructed.</p>
<p>The provided <a href="../span/struct.Attributes.html"><code>Attributes</code></a> contains any field values that were provided
when the span was created. The subscriber may pass a <a href="../field/trait.Visit.html">visitor</a> to the
<code>Attributes</code> <a href="../span/struct.Attributes.html#method.record"><code>record</code> method</a> to record these values.</p>
<code>Attributes</code>' <a href="../span/struct.Attributes.html#method.record"><code>record</code> method</a> to record these values.</p>
<p>IDs are used to uniquely identify spans and events within the context of a
subscriber, so span equality will be based on the returned ID. Thus, if
the subscriber wishes for all spans with the same metadata to be
@@ -105,14 +105,14 @@ Recording multiple values for the same field is possible,
but the actual behaviour is defined by the subscriber implementation.</p>
<p>Keep in mind that a span might not provide a value
for each field it declares.</p>
<p>The subscriber is expected to provide a <a href="../field/trait.Visit.html">visitor</a> to the <code>Record</code>s
<p>The subscriber is expected to provide a <a href="../field/trait.Visit.html">visitor</a> to the <code>Record</code>'s
<a href="../span/struct.Record.html#method.record"><code>record</code> method</a> in order to record the added values.</p>
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
<p>“foo = 3” will be recorded when <a href="../span/struct.Attributes.html#method.record"><code>record</code></a> is called on the
<p>&quot;foo = 3&quot; will be recorded when <a href="../span/struct.Attributes.html#method.record"><code>record</code></a> is called on the
<code>Attributes</code> passed to <code>new_span</code>.
Since values are not provided for the <code>bar</code> and <code>baz</code> fields,
the spans <code>Metadata</code> will indicate that it <em>has</em> those fields,
but values for them wont be recorded at this time.</p>
the span's <code>Metadata</code> will indicate that it <em>has</em> those fields,
but values for them won't be recorded at this time.</p>
<div class='information'><div class='tooltip ignore'></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
@@ -145,13 +145,13 @@ subscriber knows about, or if a cyclical relationship would be created
follow from <em>b</em>), it may silently do nothing.</p>
</div><h3 id="tymethod.event" class="method"><code>fn <a href="#tymethod.event" class="fnname">event</a>(&amp;self, event: &amp;<a class="struct" href="../../tracing_core/struct.Event.html" title="struct tracing_core::Event">Event</a>&lt;'_&gt;)</code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#302" title="goto source code">[src]</a></h3><div class="docblock"><p>Records that an <a href="../event/struct.Event.html"><code>Event</code></a> has occurred.</p>
<p>This method will be invoked when an Event is constructed by
the <code>Event</code>s <a href="../event/struct.Event.html#method.dispatch"><code>dispatch</code> method</a>. For example, this happens internally
the <code>Event</code>'s <a href="../event/struct.Event.html#method.dispatch"><code>dispatch</code> method</a>. For example, this happens internally
when an event macro from <code>tracing</code> is called.</p>
<p>The key difference between this method and <code>record</code> is that <code>record</code> is
called when a value is recorded for a field defined by a span,
while <code>event</code> is called when a new event occurs.</p>
<p>The provided <code>Event</code> struct contains any field values attached to the
event. The subscriber may pass a <a href="../field/trait.Visit.html">visitor</a> to the <code>Event</code>s
event. The subscriber may pass a <a href="../field/trait.Visit.html">visitor</a> to the <code>Event</code>'s
<a href="../event/struct.Event.html#method.record"><code>record</code> method</a> to record these values.</p>
</div><h3 id="tymethod.enter" class="method"><code>fn <a href="#tymethod.enter" class="fnname">enter</a>(&amp;self, span: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>)</code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#312" title="goto source code">[src]</a></h3><div class="docblock"><p>Records that a span has been entered.</p>
<p>When entering a span, this method is called to notify the subscriber
@@ -166,7 +166,7 @@ tracking the current span accordingly.</p>
<p>Exiting a span does not imply that the span will not be re-entered.</p>
</div></div><span class="loading-content">Loading content...</span><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.register_callsite" class="method"><code>fn <a href="#method.register_callsite" class="fnname">register_callsite</a>(&amp;self, metadata: &amp;'static <a class="struct" href="../../tracing_core/struct.Metadata.html" title="struct tracing_core::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></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#140-146" title="goto source code">[src]</a></h3><div class="docblock"><p>Registers a new callsite with this subscriber, returning whether or not
the subscriber is interested in being notified about the callsite.</p>
<p>By default, this function assumes that the subscribers <a href="#method.enabled">filter</a>
<p>By default, this function assumes that the subscriber's <a href="#method.enabled">filter</a>
represents an unchanging view of its interest in the callsite. However,
if this is not the case, subscribers may override this function to
indicate different interests, or to implement behaviour that should run
@@ -187,7 +187,7 @@ that callsite. If all active subscribers return <code>Never</code>, a callsite w
never be enabled unless a new subscriber expresses interest in it.</p>
<p><code>Subscriber</code>s which require their filters to be run every time an event
occurs or a span is entered/exited should return <code>Interest::sometimes</code>.
If a subscriber returns <code>Interest::sometimes</code>, then its <a href="#method.enabled"><code>enabled</code></a> method
If a subscriber returns <code>Interest::sometimes</code>, then its' <a href="#method.enabled"><code>enabled</code></a> method
will be called every time an event or span is created from that callsite.</p>
<p>For example, suppose a sampling subscriber is implemented by
incrementing a counter every time <code>enabled</code> is called and only returning
@@ -234,7 +234,7 @@ this method, it is responsible for ensuring that
level changes.</p>
</div><h3 id="method.clone_span" class="method"><code>fn <a href="#method.clone_span" class="fnname">clone_span</a>(&amp;self, id: &amp;<a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>) -&gt; <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#346-348" title="goto source code">[src]</a></h3><div class="docblock"><p>Notifies the subscriber that a <a href="../span/struct.Id.html">span ID</a> has been cloned.</p>
<p>This function is guaranteed to only be called with span IDs that were
returned by this subscribers <code>new_span</code> function.</p>
returned by this subscriber's <code>new_span</code> function.</p>
<p>Note that the default implementation of this function this is just the
identity function, passing through the identifier. However, it can be
used in conjunction with <a href="trait.Subscriber.html#method.try_close"><code>try_close</code></a> to track the number of handles
@@ -244,28 +244,28 @@ given ID), the subscriber may assume that the span will not be entered
again. It is then free to deallocate storage for data associated with
that span, write data from that span to IO, and so on.</p>
<p>For more unsafe situations, however, if <code>id</code> is itself a pointer of some
kind this can be used as a hook to “clone” the pointer, depending on
kind this can be used as a hook to &quot;clone&quot; the pointer, depending on
what that means for the specified pointer.</p>
</div><h3 id="method.drop_span" class="method"><code>fn <a href="#method.drop_span" class="fnname">drop_span</a>(&amp;self, _id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>)</code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#360" title="goto source code">[src]</a></h3><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 0.1.2: <p>use <code>Subscriber::try_close</code> instead</p>
</div></div><div class="docblock"><p><strong>This method is deprecated.</strong></p>
<p>Using <code>drop_span</code> may result in subscribers composed using
<code>tracing-subscriber</code> crates <code>Layer</code> trait from observing close events.
<code>tracing-subscriber</code> crate's <code>Layer</code> trait from observing close events.
Use <a href="trait.Subscriber.html#method.try_close"><code>try_close</code></a> instead.</p>
<p>The default implementation of this function does nothing.</p>
</div><h3 id="method.try_close" class="method"><code>fn <a href="#method.try_close" class="fnname">try_close</a>(&amp;self, id: <a class="struct" href="../../tracing_core/span/struct.Id.html" title="struct tracing_core::span::Id">Id</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#398-402" title="goto source code">[src]</a></h3><div class="docblock"><p>Notifies the subscriber that a [<code>span ID</code>] has been dropped, and returns
<code>true</code> if there are now 0 IDs that refer to that span.</p>
<p>Higher-level libraries providing functionality for composing multiple
subscriber implementations may use this return value to notify any
“layered” subscribers that this subscriber considers the span closed.</p>
<p>The default implementation of this method calls the subscribers
&quot;layered&quot; subscribers that this subscriber considers the span closed.</p>
<p>The default implementation of this method calls the subscriber's
<a href="trait.Subscriber.html#method.drop_span"><code>drop_span</code></a> method and returns <code>false</code>. This means that, unless the
subscriber overrides the default implementation, close notifications
will never be sent to any layered subscribers. In general, if the
subscriber tracks reference counts, this method should be implemented,
rather than <code>drop_span</code>.</p>
<p>This function is guaranteed to only be called with span IDs that were
returned by this subscribers <code>new_span</code> function.</p>
<p>Its guaranteed that if this function has been called once more than the
returned by this subscriber's <code>new_span</code> function.</p>
<p>It's guaranteed that if this function has been called once more than the
number of times <code>clone_span</code> was called with the same <code>id</code>, then no more
handles that can enter the span with that <code>id</code> exist. This means that it
can be used in conjunction with <a href="trait.Subscriber.html#method.clone_span"><code>clone_span</code></a> to track the number of
@@ -279,7 +279,7 @@ that span to IO, and so on.</p>
implementations should ensure that they are unwind-safe. Panicking from
inside of a <code>try_close</code> function may cause a double panic, if the span
was dropped due to a thread unwinding.</p>
</div><h3 id="method.current_span" class="method"><code>fn <a href="#method.current_span" class="fnname">current_span</a>(&amp;self) -&gt; <a class="struct" href="../../tracing_core/span/struct.Current.html" title="struct tracing_core::span::Current">Current</a></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#417-419" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns a type representing this subscribers view of the current span.</p>
</div><h3 id="method.current_span" class="method"><code>fn <a href="#method.current_span" class="fnname">current_span</a>(&amp;self) -&gt; <a class="struct" href="../../tracing_core/span/struct.Current.html" title="struct tracing_core::span::Current">Current</a></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#417-419" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns a type representing this subscriber's view of the current span.</p>
<p>If subscribers track a current span, they should override this function
to return <a href="../span/struct.Current.html#tymethod.new"><code>Current::new</code></a> if the thread from which this method is
called is inside a span, or <a href="../span/struct.Current.html#tymethod.none"><code>Current::none</code></a> if the thread is not
@@ -296,7 +296,7 @@ signature like <a href="#method.downcast_ref"><code>downcast_ref</code></a> (wit
object-safe, and thus cannot be a trait method for <code>Subscriber</code>. This
means that if we only exposed <code>downcast_ref</code>, <code>Subscriber</code>
implementations could not override the downcasting behavior</p>
<p>This method may be overridden by “fan out” or “chained” subscriber
<p>This method may be overridden by &quot;fan out&quot; or &quot;chained&quot; subscriber
implementations which consist of multiple composed types. Such
subscribers might allow <code>downcast_raw</code> by returning references to those
component if they contain components with the given <code>TypeId</code>.</p>
@@ -307,6 +307,5 @@ with the provided <code>TypeId</code>. Failure to ensure this will result in
undefined behaviour, so implementing <code>downcast_raw</code> is unsafe.</p>
</div></div><span class="loading-content">Loading content...</span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl dyn <a class="trait" href="../../tracing_core/trait.Subscriber.html" title="trait tracing_core::Subscriber">Subscriber</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#457-475" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.is" class="method"><code>pub fn <a href="#method.is" class="fnname">is</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#459-461" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns <code>true</code> if this <code>Subscriber</code> is the same type as <code>T</code>.</p>
</div><h4 id="method.downcast_ref" class="method"><code>pub fn <a href="#method.downcast_ref" class="fnname">downcast_ref</a>&lt;T:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>&gt;(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T&gt;</code><a class="srclink" href="../../src/tracing_core/subscriber.rs.html#465-474" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns some reference to this <code>Subscriber</code> value if it is of type <code>T</code>,
or <code>None</code> if it isnt.</p>
</div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/tracing_core/subscriber/trait.Subscriber.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="tracing_core"></div>
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
or <code>None</code> if it isn't.</p>
</div></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/tracing_core/subscriber/trait.Subscriber.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "tracing_core";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>