mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-18 00:38:14 +00:00
deploy: de38ae62916547ad097c066f94a32e9ba7790eeb
This commit is contained in:
commit
9a86359447
28502 changed files with 1261284 additions and 0 deletions
1
tracing_core/all.html
Normal file
1
tracing_core/all.html
Normal file
File diff suppressed because one or more lines are too long
14
tracing_core/callsite/fn.rebuild_interest_cache.html
Normal file
14
tracing_core/callsite/fn.rebuild_interest_cache.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!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="Clear and reregister interest on every `Callsite`"><title>rebuild_interest_cache in tracing_core::callsite - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>callsite</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">callsite</a></span><h1>Function <span class="fn">rebuild_interest_cache</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/callsite.rs.html#223-225">Source</a> </span></div><pre class="rust item-decl"><code>pub fn rebuild_interest_cache()</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Clear and reregister interest on every <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a></p>
|
||||
<p>This function is intended for runtime reconfiguration of filters on traces
|
||||
when the filter recalculation is much less frequent than trace events are.
|
||||
The alternative is to have the <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a> that supports runtime
|
||||
reconfiguration of filters always return <a href="../subscriber/struct.Interest.html#method.sometimes" title="associated function tracing_core::subscriber::Interest::sometimes"><code>Interest::sometimes()</code></a> so that
|
||||
<a href="../trait.Subscriber.html#tymethod.enabled" title="trait tracing_core::Subscriber"><code>enabled</code></a> is evaluated for every event.</p>
|
||||
<p>This function will also re-compute the global maximum level as determined by
|
||||
the <a href="../trait.Subscriber.html#method.max_level_hint" title="method tracing_core::Subscriber::max_level_hint"><code>max_level_hint</code></a> method. If a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>
|
||||
implementation changes the value returned by its <code>max_level_hint</code>
|
||||
implementation at runtime, then it <strong>must</strong> call this function after that
|
||||
value changes, in order for the change to be reflected.</p>
|
||||
<p>See the <a href="index.html#rebuilding-cached-interest" title="mod tracing_core::callsite">documentation on callsite interest caching</a> for
|
||||
additional information on this function’s usage.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
6
tracing_core/callsite/fn.register.html
Normal file
6
tracing_core/callsite/fn.register.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!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="Register a new `Callsite` with the global registry."><title>register in tracing_core::callsite - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>callsite</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">callsite</a></span><h1>Function <span class="fn">register</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/callsite.rs.html#237-254">Source</a> </span></div><pre class="rust item-decl"><code>pub fn register(callsite: &'static dyn <a class="trait" href="../trait.Callsite.html" title="trait tracing_core::Callsite">Callsite</a>)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Register a new <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> with the global registry.</p>
|
||||
<p>This should be called once per callsite after the callsite has been
|
||||
constructed.</p>
|
||||
<p>See the <a href="index.html#registering-callsites" title="mod tracing_core::callsite">documentation on callsite registration</a> for details
|
||||
on the global callsite registry.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
71
tracing_core/callsite/index.html
Normal file
71
tracing_core/callsite/index.html
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<!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="Callsites represent the source locations from which spans or events originate."><title>tracing_core::callsite - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module callsite</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#what-are-callsites" title="What Are Callsites?">What Are Callsites?</a></li><li><a href="#registering-callsites" title="Registering Callsites">Registering Callsites</a><ul><li><a href="#callsite-existence" title="Callsite Existence">Callsite Existence</a></li><li><a href="#performing-static-filtering" title="Performing Static Filtering">Performing Static Filtering</a></li></ul></li><li><a href="#implementing-callsites" title="Implementing Callsites">Implementing Callsites</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>callsite</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/callsite.rs.html#1-618">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Callsites represent the source locations from which spans or events
|
||||
originate.</p>
|
||||
<h2 id="what-are-callsites"><a class="doc-anchor" href="#what-are-callsites">§</a>What Are Callsites?</h2>
|
||||
<p>Every span or event in <code>tracing</code> is associated with a <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a>. A
|
||||
callsite is a small <code>static</code> value that is responsible for the following:</p>
|
||||
<ul>
|
||||
<li>Storing the span or event’s <a href="../struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a>,</li>
|
||||
<li>Uniquely <a href="struct.Identifier.html" title="struct tracing_core::callsite::Identifier">identifying</a> the span or event definition,</li>
|
||||
<li>Caching the subscriber’s <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a><sup id="fnref1"><a href="#fn1">1</a></sup> in that span or event, to avoid
|
||||
re-evaluating filters.</li>
|
||||
</ul>
|
||||
<h2 id="registering-callsites"><a class="doc-anchor" href="#registering-callsites">§</a>Registering Callsites</h2>
|
||||
<p>When a span or event is recorded for the first time, its callsite
|
||||
<a href="fn.register.html" title="fn tracing_core::callsite::register"><code>register</code></a>s itself with the global callsite registry. Registering a
|
||||
callsite calls the <a href="../trait.Subscriber.html#method.register_callsite" title="method tracing_core::Subscriber::register_callsite"><code>Subscriber::register_callsite</code></a>
|
||||
method with that callsite’s <a href="../struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a> on every currently active
|
||||
subscriber. This serves two primary purposes: informing subscribers of the
|
||||
callsite’s existence, and performing static filtering.</p>
|
||||
<h3 id="callsite-existence"><a class="doc-anchor" href="#callsite-existence">§</a>Callsite Existence</h3>
|
||||
<p>If a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a> implementation wishes to allocate storage for each
|
||||
unique span/event location in the program, or pre-compute some value
|
||||
that will be used to record that span or event in the future, it can
|
||||
do so in its <a href="../trait.Subscriber.html#method.register_callsite" title="method tracing_core::Subscriber::register_callsite"><code>register_callsite</code></a> method.</p>
|
||||
<h3 id="performing-static-filtering"><a class="doc-anchor" href="#performing-static-filtering">§</a>Performing Static Filtering</h3>
|
||||
<p>The <a href="../trait.Subscriber.html#method.register_callsite" title="method tracing_core::Subscriber::register_callsite"><code>register_callsite</code></a> method returns an <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> value,
|
||||
which indicates that the subscriber either <a href="../subscriber/struct.Interest.html#method.always" title="associated function tracing_core::subscriber::Interest::always">always</a> wishes to record
|
||||
that span or event, <a href="../subscriber/struct.Interest.html#method.sometimes" title="associated function tracing_core::subscriber::Interest::sometimes">sometimes</a> wishes to record it based on a
|
||||
dynamic filter evaluation, or <a href="../subscriber/struct.Interest.html#method.never" title="associated function tracing_core::subscriber::Interest::never">never</a> wishes to record it.</p>
|
||||
<p>When registering a new callsite, the <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a>s returned by every
|
||||
currently active subscriber are combined, and the result is stored at
|
||||
each callsite. This way, when the span or event occurs in the
|
||||
future, the cached <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> value can be checked efficiently
|
||||
to determine if the span or event should be recorded, without
|
||||
needing to perform expensive filtering (i.e. calling the
|
||||
<a href="../trait.Subscriber.html#tymethod.enabled" title="method tracing_core::Subscriber::enabled"><code>Subscriber::enabled</code></a> method every time a span or event occurs).</p>
|
||||
<h4 id="rebuilding-cached-interest"><a class="doc-anchor" href="#rebuilding-cached-interest">§</a>Rebuilding Cached Interest</h4>
|
||||
<p>When a new <a href="crate::dispatch::Dispatch"><code>Dispatch</code></a> is created (i.e. a new subscriber becomes
|
||||
active), any previously cached <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> values are re-evaluated
|
||||
for all callsites in the program. This way, if the new subscriber
|
||||
will enable a callsite that was not previously enabled, the
|
||||
<a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> in that callsite is updated. Similarly, when a
|
||||
subscriber is dropped, the interest cache is also re-evaluated, so
|
||||
that any callsites enabled only by that subscriber are disabled.</p>
|
||||
<p>In addition, the <a href="fn.rebuild_interest_cache.html" title="fn tracing_core::callsite::rebuild_interest_cache"><code>rebuild_interest_cache</code></a> function in this module can be
|
||||
used to manually invalidate all cached interest and re-register those
|
||||
callsites. This function is useful in situations where a subscriber’s
|
||||
interest can change, but it does so relatively infrequently. The subscriber
|
||||
may wish for its interest to be cached most of the time, and return
|
||||
<a href="../subscriber/struct.Interest.html#method.always" title="associated function tracing_core::subscriber::Interest::always"><code>Interest::always</code></a> or <a href="../subscriber/struct.Interest.html#method.never" title="associated function tracing_core::subscriber::Interest::never"><code>Interest::never</code></a> in its
|
||||
<a href="../trait.Subscriber.html#method.register_callsite" title="method tracing_core::Subscriber::register_callsite"><code>register_callsite</code></a> method, so that its <a href="../trait.Subscriber.html#tymethod.enabled" title="method tracing_core::Subscriber::enabled"><code>Subscriber::enabled</code></a> method
|
||||
doesn’t need to be evaluated every time a span or event is recorded.
|
||||
However, when the configuration changes, the subscriber can call
|
||||
<a href="fn.rebuild_interest_cache.html" title="fn tracing_core::callsite::rebuild_interest_cache"><code>rebuild_interest_cache</code></a> to re-evaluate the entire interest cache with its
|
||||
new configuration. This is a relatively costly operation, but if the
|
||||
configuration changes infrequently, it may be more efficient than calling
|
||||
<a href="../trait.Subscriber.html#tymethod.enabled" title="method tracing_core::Subscriber::enabled"><code>Subscriber::enabled</code></a> frequently.</p>
|
||||
<h2 id="implementing-callsites"><a class="doc-anchor" href="#implementing-callsites">§</a>Implementing Callsites</h2>
|
||||
<p>In most cases, instrumenting code using <code>tracing</code> should <em>not</em> require
|
||||
implementing the <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> trait directly. When using the <a href="https://docs.rs/tracing/latest/tracing/#macros"><code>tracing</code>
|
||||
crate’s macros</a> or the <a href="https://docs.rs/tracing/latest/tracing/attr.instrument.html"><code>#[instrument]</code> attribute</a>, a
|
||||
<code>Callsite</code> is automatically generated.</p>
|
||||
<p>However, code which provides alternative forms of <code>tracing</code> instrumentation
|
||||
may need to interact with the callsite system directly. If
|
||||
instrumentation-side code needs to produce a <code>Callsite</code> to emit spans or
|
||||
events, the <a href="struct.DefaultCallsite.html" title="struct tracing_core::callsite::DefaultCallsite"><code>DefaultCallsite</code></a> struct provided in this module is a
|
||||
ready-made <code>Callsite</code> implementation that is suitable for most uses. When
|
||||
possible, the use of <code>DefaultCallsite</code> should be preferred over implementing
|
||||
<a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> for user types, as <code>DefaultCallsite</code> may benefit from
|
||||
additional performance optimizations.</p>
|
||||
<div class="footnotes"><hr><ol><li id="fn1"><p>Returned by the <a href="crate::subscriber::Subscriber::register_callsite"><code>Subscriber::register_callsite</code></a>
|
||||
method. <a href="#fnref1">↩</a></p></li></ol></div></div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DefaultCallsite.html" title="struct tracing_core::callsite::DefaultCallsite">Default<wbr>Callsite</a></div><div class="desc docblock-short">A default <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> implementation.</div></li><li><div class="item-name"><a class="struct" href="struct.Identifier.html" title="struct tracing_core::callsite::Identifier">Identifier</a></div><div class="desc docblock-short">Uniquely identifies a <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a></div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Callsite.html" title="trait tracing_core::callsite::Callsite">Callsite</a></div><div class="desc docblock-short">Trait implemented by callsites.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.rebuild_interest_cache.html" title="fn tracing_core::callsite::rebuild_interest_cache">rebuild_<wbr>interest_<wbr>cache</a></div><div class="desc docblock-short">Clear and reregister interest on every <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a></div></li><li><div class="item-name"><a class="fn" href="fn.register.html" title="fn tracing_core::callsite::register">register</a></div><div class="desc docblock-short">Register a new <a href="../trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> with the global registry.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/callsite/sidebar-items.js
Normal file
1
tracing_core/callsite/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["rebuild_interest_cache","register"],"struct":["DefaultCallsite","Identifier"],"trait":["Callsite"]};
|
||||
24
tracing_core/callsite/struct.DefaultCallsite.html
Normal file
24
tracing_core/callsite/struct.DefaultCallsite.html
Normal file
File diff suppressed because one or more lines are too long
19
tracing_core/callsite/struct.Identifier.html
Normal file
19
tracing_core/callsite/struct.Identifier.html
Normal file
File diff suppressed because one or more lines are too long
20
tracing_core/callsite/trait.Callsite.html
Normal file
20
tracing_core/callsite/trait.Callsite.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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 implemented by callsites."><title>Callsite in tracing_core::callsite - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Callsite</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.metadata" title="metadata">metadata</a></li><li><a href="#tymethod.set_interest" title="set_interest">set_interest</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>callsite</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">callsite</a></span><h1>Trait <span class="trait">Callsite</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/callsite.rs.html#126-171">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Callsite: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.set_interest" class="fn">set_interest</a>(&self, interest: <a class="struct" href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a>);
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.metadata" class="fn">metadata</a>(&self) -> &<a class="struct" href="../struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a><'_>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait implemented by callsites.</p>
|
||||
<p>These functions are only intended to be called by the callsite registry, which
|
||||
correctly handles determining the common interest between all subscribers.</p>
|
||||
<p>See the <a href="index.html" title="mod tracing_core::callsite">module-level documentation</a> for details on
|
||||
callsites.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.set_interest" class="method"><a class="src rightside" href="../../src/tracing_core/callsite.rs.html#134">Source</a><h4 class="code-header">fn <a href="#tymethod.set_interest" class="fn">set_interest</a>(&self, interest: <a class="struct" href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a>)</h4></section></summary><div class="docblock"><p>Sets the <a href="../subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> for this callsite.</p>
|
||||
<p>See the <a href="index.html#performing-static-filtering" title="mod tracing_core::callsite">documentation on callsite interest caching</a> for
|
||||
details.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.metadata" class="method"><a class="src rightside" href="../../src/tracing_core/callsite.rs.html#148">Source</a><h4 class="code-header">fn <a href="#tymethod.metadata" class="fn">metadata</a>(&self) -> &<a class="struct" href="../struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a><'_></h4></section></summary><div class="docblock"><p>Returns the <a href="../struct.Metadata.html" title="struct tracing_core::Metadata">metadata</a> associated with the callsite.</p>
|
||||
<div class="example-wrap" style="display:inline-block">
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<p><strong>Note:</strong> Implementations of this method should not produce <a href="../struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a>
|
||||
that share the same callsite <a href="struct.Identifier.html" title="struct tracing_core::callsite::Identifier"><code>Identifier</code></a> but otherwise differ in any
|
||||
way (e.g., have different <code>name</code>s).</p>
|
||||
<p></pre></div></p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Callsite-for-DefaultCallsite" class="impl"><a class="src rightside" href="../../src/tracing_core/callsite.rs.html#358-372">Source</a><a href="#impl-Callsite-for-DefaultCallsite" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Callsite.html" title="trait tracing_core::Callsite">Callsite</a> for <a class="struct" href="struct.DefaultCallsite.html" title="struct tracing_core::callsite::DefaultCallsite">DefaultCallsite</a></h3></section></div><script src="../../trait.impl/tracing_core/callsite/trait.Callsite.js" async></script></section></div></main></body></html>
|
||||
6
tracing_core/dispatcher/fn.get_default.html
Normal file
6
tracing_core/dispatcher/fn.get_default.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!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="Executes a closure with a reference to this thread’s current dispatcher."><title>get_default in tracing_core::dispatcher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>dispatcher</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">dispatcher</a></span><h1>Function <span class="fn">get_default</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/dispatcher.rs.html#382-401">Source</a> </span></div><pre class="rust item-decl"><code>pub fn get_default<T, F>(f: F) -> T<div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&<a class="struct" href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">Dispatch</a>) -> T,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Executes a closure with a reference to this thread’s current <a href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">dispatcher</a>.</p>
|
||||
<p>Note that calls to <code>get_default</code> should not be nested; if this function is
|
||||
called while inside of another <code>get_default</code>, that closure will be provided
|
||||
with <code>Dispatch::none</code> rather than the previously set dispatcher.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
8
tracing_core/dispatcher/fn.set_default.html
Normal file
8
tracing_core/dispatcher/fn.set_default.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!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="Sets the dispatch as the default dispatch for the duration of the lifetime of the returned DefaultGuard"><title>set_default in tracing_core::dispatcher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>dispatcher</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">dispatcher</a></span><h1>Function <span class="fn">set_default</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/dispatcher.rs.html#279-284">Source</a> </span></div><pre class="rust item-decl"><code>pub fn set_default(dispatcher: &<a class="struct" href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">Dispatch</a>) -> <a class="struct" href="struct.DefaultGuard.html" title="struct tracing_core::dispatcher::DefaultGuard">DefaultGuard</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sets the dispatch as the default dispatch for the duration of the lifetime
|
||||
of the returned DefaultGuard</p>
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>: This function required the Rust standard library.
|
||||
<code>no_std</code> users should use <a href="../fn.set_global_default.html">
|
||||
<code>set_global_default</code></a> instead.
|
||||
</pre>
|
||||
</div></details></section></div></main></body></html>
|
||||
13
tracing_core/dispatcher/fn.set_global_default.html
Normal file
13
tracing_core/dispatcher/fn.set_global_default.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!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="Sets this dispatch as the global default for the duration of the entire program. Will be used as a fallback if no thread-local dispatch has been set in a thread (using `with_default`.)"><title>set_global_default in tracing_core::dispatcher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>dispatcher</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">dispatcher</a></span><h1>Function <span class="fn">set_global_default</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/dispatcher.rs.html#302-335">Source</a> </span></div><pre class="rust item-decl"><code>pub fn set_global_default(
|
||||
dispatcher: <a class="struct" href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">Dispatch</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.unit.html">()</a>, <a class="struct" href="struct.SetGlobalDefaultError.html" title="struct tracing_core::dispatcher::SetGlobalDefaultError">SetGlobalDefaultError</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sets this dispatch as the global default for the duration of the entire program.
|
||||
Will be used as a fallback if no thread-local dispatch has been set in a thread
|
||||
(using <code>with_default</code>.)</p>
|
||||
<p>Can only be set once; subsequent attempts to set the global default will fail.
|
||||
Returns <code>Err</code> if the global default has already been set.</p>
|
||||
<div class="example-wrap" style="display:inline-block"><pre class="compile_fail" style="white-space:normal;font:inherit;">
|
||||
<strong>Warning</strong>: In general, libraries should <em>not</em> call
|
||||
<code>set_global_default()</code>! Doing so will cause conflicts when
|
||||
executables that depend on the library try to set the default later.
|
||||
</pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
9
tracing_core/dispatcher/fn.with_default.html
Normal file
9
tracing_core/dispatcher/fn.with_default.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!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="Sets this dispatch as the default for the duration of a closure."><title>with_default in tracing_core::dispatcher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>dispatcher</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">dispatcher</a></span><h1>Function <span class="fn">with_default</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/dispatcher.rs.html#257-264">Source</a> </span></div><pre class="rust item-decl"><code>pub fn with_default<T>(dispatcher: &<a class="struct" href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">Dispatch</a>, f: impl <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -> T) -> T</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Sets this dispatch as the default for the duration of a closure.</p>
|
||||
<p>The default dispatcher is used when creating a new <a href="../span/index.html" title="mod tracing_core::span">span</a> or
|
||||
<a href="../struct.Event.html" title="struct tracing_core::Event"><code>Event</code></a>.</p>
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>: This function required the Rust standard library.
|
||||
<code>no_std</code> users should use <a href="../fn.set_global_default.html">
|
||||
<code>set_global_default</code></a> instead.
|
||||
</pre>
|
||||
</div></details></section></div></main></body></html>
|
||||
67
tracing_core/dispatcher/index.html
Normal file
67
tracing_core/dispatcher/index.html
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<!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="Dispatches trace events to `Subscriber`s."><title>tracing_core::dispatcher - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dispatcher</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#using-the-trace-dispatcher" title="Using the Trace Dispatcher">Using the Trace Dispatcher</a><ul><li><a href="#setting-the-default-subscriber" title="Setting the Default Subscriber">Setting the Default Subscriber</a></li><li><a href="#accessing-the-default-subscriber" title="Accessing the Default Subscriber">Accessing the Default Subscriber</a></li></ul></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>dispatcher</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/dispatcher.rs.html#1-1069">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Dispatches trace events to <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>s.</p>
|
||||
<p>The <em>dispatcher</em> is the component of the tracing system which is responsible
|
||||
for forwarding trace data from the instrumentation points that generate it
|
||||
to the subscriber that collects it.</p>
|
||||
<h2 id="using-the-trace-dispatcher"><a class="doc-anchor" href="#using-the-trace-dispatcher">§</a>Using the Trace Dispatcher</h2>
|
||||
<p>Every thread in a program using <code>tracing</code> has a <em>default subscriber</em>. When
|
||||
events occur, or spans are created, they are dispatched to the thread’s
|
||||
current subscriber.</p>
|
||||
<h3 id="setting-the-default-subscriber"><a class="doc-anchor" href="#setting-the-default-subscriber">§</a>Setting the Default Subscriber</h3>
|
||||
<p>By default, the current subscriber is an empty implementation that does
|
||||
nothing. To use a subscriber implementation, it must be set as the default.
|
||||
There are two methods for doing so: <a href="fn.with_default.html" title="fn tracing_core::dispatcher::with_default"><code>with_default</code></a> and
|
||||
<a href="fn.set_global_default.html" title="fn tracing_core::dispatcher::set_global_default"><code>set_global_default</code></a>. <code>with_default</code> sets the default subscriber for the
|
||||
duration of a scope, while <code>set_global_default</code> sets a default subscriber
|
||||
for the entire process.</p>
|
||||
<p>To use either of these functions, we must first wrap our subscriber in a
|
||||
<a href="../struct.Dispatch.html" title="struct tracing_core::Dispatch"><code>Dispatch</code></a>, a cloneable, type-erased reference to a subscriber. For
|
||||
example:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>dispatcher::Dispatch;
|
||||
|
||||
<span class="kw">let </span>my_subscriber = FooSubscriber::new();
|
||||
<span class="kw">let </span>my_dispatch = Dispatch::new(my_subscriber);</code></pre></div>
|
||||
<p>Then, we can use <a href="fn.with_default.html" title="fn tracing_core::dispatcher::with_default"><code>with_default</code></a> to set our <code>Dispatch</code> as the default for
|
||||
the duration of a block:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// no default subscriber
|
||||
|
||||
</span>dispatcher::with_default(<span class="kw-2">&</span>my_dispatch, || {
|
||||
<span class="comment">// my_subscriber is the default
|
||||
</span>});
|
||||
|
||||
<span class="comment">// no default subscriber again</span></code></pre></div>
|
||||
<p>It’s important to note that <code>with_default</code> will not propagate the current
|
||||
thread’s default subscriber to any threads spawned within the <code>with_default</code>
|
||||
block. To propagate the default subscriber to new threads, either use
|
||||
<code>with_default</code> from the new thread, or use <code>set_global_default</code>.</p>
|
||||
<p>As an alternative to <code>with_default</code>, we can use <a href="fn.set_global_default.html" title="fn tracing_core::dispatcher::set_global_default"><code>set_global_default</code></a> to
|
||||
set a <code>Dispatch</code> as the default for all threads, for the lifetime of the
|
||||
program. For example:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// no default subscriber
|
||||
|
||||
</span>dispatcher::set_global_default(my_dispatch)
|
||||
<span class="comment">// `set_global_default` will return an error if the global default
|
||||
// subscriber has already been set.
|
||||
</span>.expect(<span class="string">"global default was already set!"</span>);
|
||||
|
||||
<span class="comment">// `my_subscriber` is now the default</span></code></pre></div>
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>:the thread-local scoped dispatcher
|
||||
(<a href="#fn.with_default"><code>with_default</code></a>) requires the
|
||||
Rust standard library. <code>no_std</code> users should use
|
||||
<a href="#fn.set_global_default"><code>set_global_default</code></a>
|
||||
instead.
|
||||
</pre>
|
||||
<h3 id="accessing-the-default-subscriber"><a class="doc-anchor" href="#accessing-the-default-subscriber">§</a>Accessing the Default Subscriber</h3>
|
||||
<p>A thread’s current default subscriber can be accessed using the
|
||||
<a href="fn.get_default.html" title="fn tracing_core::dispatcher::get_default"><code>get_default</code></a> function, which executes a closure with a reference to the
|
||||
currently default <code>Dispatch</code>. This is used primarily by <code>tracing</code>
|
||||
instrumentation.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DefaultGuard.html" title="struct tracing_core::dispatcher::DefaultGuard">Default<wbr>Guard</a></div><div class="desc docblock-short">A guard that resets the current default dispatcher to the prior
|
||||
default dispatcher when dropped.</div></li><li><div class="item-name"><a class="struct" href="struct.Dispatch.html" title="struct tracing_core::dispatcher::Dispatch">Dispatch</a></div><div class="desc docblock-short"><code>Dispatch</code> trace data to a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.SetGlobalDefaultError.html" title="struct tracing_core::dispatcher::SetGlobalDefaultError">SetGlobal<wbr>Default<wbr>Error</a></div><div class="desc docblock-short">Returned if setting the global dispatcher fails.</div></li><li><div class="item-name"><a class="struct" href="struct.WeakDispatch.html" title="struct tracing_core::dispatcher::WeakDispatch">Weak<wbr>Dispatch</a></div><div class="desc docblock-short"><code>WeakDispatch</code> is a version of <a href="../struct.Dispatch.html" title="struct tracing_core::Dispatch"><code>Dispatch</code></a> that holds a non-owning reference
|
||||
to a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.get_default.html" title="fn tracing_core::dispatcher::get_default">get_<wbr>default</a></div><div class="desc docblock-short">Executes a closure with a reference to this thread’s current <a href="../struct.Dispatch.html" title="struct tracing_core::Dispatch">dispatcher</a>.</div></li><li><div class="item-name"><a class="fn" href="fn.set_default.html" title="fn tracing_core::dispatcher::set_default">set_<wbr>default</a></div><div class="desc docblock-short">Sets the dispatch as the default dispatch for the duration of the lifetime
|
||||
of the returned DefaultGuard</div></li><li><div class="item-name"><a class="fn" href="fn.set_global_default.html" title="fn tracing_core::dispatcher::set_global_default">set_<wbr>global_<wbr>default</a></div><div class="desc docblock-short">Sets this dispatch as the global default for the duration of the entire program.
|
||||
Will be used as a fallback if no thread-local dispatch has been set in a thread
|
||||
(using <code>with_default</code>.)</div></li><li><div class="item-name"><a class="fn" href="fn.with_default.html" title="fn tracing_core::dispatcher::with_default">with_<wbr>default</a></div><div class="desc docblock-short">Sets this dispatch as the default for the duration of a closure.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/dispatcher/sidebar-items.js
Normal file
1
tracing_core/dispatcher/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["get_default","set_default","set_global_default","with_default"],"struct":["DefaultGuard","Dispatch","SetGlobalDefaultError","WeakDispatch"]};
|
||||
13
tracing_core/dispatcher/struct.DefaultGuard.html
Normal file
13
tracing_core/dispatcher/struct.DefaultGuard.html
Normal file
File diff suppressed because one or more lines are too long
94
tracing_core/dispatcher/struct.Dispatch.html
Normal file
94
tracing_core/dispatcher/struct.Dispatch.html
Normal file
File diff suppressed because one or more lines are too long
13
tracing_core/dispatcher/struct.SetGlobalDefaultError.html
Normal file
13
tracing_core/dispatcher/struct.SetGlobalDefaultError.html
Normal file
File diff suppressed because one or more lines are too long
33
tracing_core/dispatcher/struct.WeakDispatch.html
Normal file
33
tracing_core/dispatcher/struct.WeakDispatch.html
Normal file
File diff suppressed because one or more lines are too long
3
tracing_core/event/index.html
Normal file
3
tracing_core/event/index.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<!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="Events represent single points in time during the execution of a program."><title>tracing_core::event - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module event</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>event</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/event.rs.html#1-128">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Events represent single points in time during the execution of a program.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Event.html" title="struct tracing_core::event::Event">Event</a></div><div class="desc docblock-short"><code>Event</code>s represent single points in time where something occurred during the
|
||||
execution of a program.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/event/sidebar-items.js
Normal file
1
tracing_core/event/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Event"]};
|
||||
57
tracing_core/event/struct.Event.html
Normal file
57
tracing_core/event/struct.Event.html
Normal file
File diff suppressed because one or more lines are too long
4
tracing_core/field/fn.debug.html
Normal file
4
tracing_core/field/fn.debug.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Wraps a type implementing `fmt::Debug` as a `Value` that can be recorded using its `Debug` implementation."><title>debug in tracing_core::field - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>field</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">field</a></span><h1>Function <span class="fn">debug</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/field.rs.html#368-373">Source</a> </span></div><pre class="rust item-decl"><code>pub fn debug<T>(t: T) -> <a class="struct" href="struct.DebugValue.html" title="struct tracing_core::field::DebugValue">DebugValue</a><T><div class="where">where
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wraps a type implementing <code>fmt::Debug</code> as a <code>Value</code> that can be
|
||||
recorded using its <code>Debug</code> implementation.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
4
tracing_core/field/fn.display.html
Normal file
4
tracing_core/field/fn.display.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<!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="Wraps a type implementing `fmt::Display` as a `Value` that can be recorded using its `Display` implementation."><title>display in tracing_core::field - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>field</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">field</a></span><h1>Function <span class="fn">display</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/field.rs.html#359-364">Source</a> </span></div><pre class="rust item-decl"><code>pub fn display<T>(t: T) -> <a class="struct" href="struct.DisplayValue.html" title="struct tracing_core::field::DisplayValue">DisplayValue</a><T><div class="where">where
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wraps a type implementing <code>fmt::Display</code> as a <code>Value</code> that can be
|
||||
recorded using its <code>Display</code> implementation.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
85
tracing_core/field/index.html
Normal file
85
tracing_core/field/index.html
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<!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="`Span` and `Event` key-value data."><title>tracing_core::field - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module field</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#values-and-subscribers" title="`Value`s and `Subscriber`s"><code>Value</code>s and <code>Subscriber</code>s</a></li><li><a href="#using-valuable" title="Using `valuable`">Using <code>valuable</code></a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>field</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/field.rs.html#1-1320">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><code>Span</code> and <code>Event</code> key-value data.</p>
|
||||
<p>Spans and events may be annotated with key-value data, known as <em>fields</em>.
|
||||
These fields consist of a mapping from a key (corresponding to a <code>&str</code> but
|
||||
represented internally as an array index) to a <a href="trait.Value.html" title="trait tracing_core::field::Value"><code>Value</code></a>.</p>
|
||||
<h2 id="values-and-subscribers"><a class="doc-anchor" href="#values-and-subscribers">§</a><code>Value</code>s and <code>Subscriber</code>s</h2>
|
||||
<p><code>Subscriber</code>s consume <code>Value</code>s as fields attached to <a href="../span/index.html" title="mod tracing_core::span">span</a>s or <a href="../struct.Event.html" title="struct tracing_core::Event"><code>Event</code></a>s.
|
||||
The set of field keys on a given span or event is defined on its <a href="../struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a>.
|
||||
When a span is created, it provides <a href="../span/struct.Attributes.html" title="struct tracing_core::span::Attributes"><code>Attributes</code></a> to the <code>Subscriber</code>’s
|
||||
<a href="../trait.Subscriber.html#tymethod.new_span" title="method tracing_core::Subscriber::new_span"><code>new_span</code></a> method, containing any fields whose values were provided when
|
||||
the span was created; and may call the <code>Subscriber</code>’s <a href="../span/struct.Record.html" title="struct tracing_core::span::Record"><code>record</code></a> method
|
||||
with additional <a href="../span/struct.Record.html" title="struct tracing_core::span::Record"><code>Record</code></a>s if values are added for more of its fields.
|
||||
Similarly, the <a href="../struct.Event.html" title="struct tracing_core::Event"><code>Event</code></a> type passed to the subscriber’s <a href="../struct.Event.html" title="struct tracing_core::Event"><code>event</code></a> method
|
||||
will contain any fields attached to each event.</p>
|
||||
<p><code>tracing</code> represents values as either one of a set of Rust primitives
|
||||
(<code>i64</code>, <code>u64</code>, <code>f64</code>, <code>i128</code>, <code>u128</code>, <code>bool</code>, and <code>&str</code>) or using a
|
||||
<code>fmt::Display</code> or <code>fmt::Debug</code> implementation. <code>Subscriber</code>s are provided
|
||||
these primitive value types as <code>dyn Value</code> trait objects.</p>
|
||||
<p>These trait objects can be formatted using <code>fmt::Debug</code>, but may also be
|
||||
recorded as typed data by calling the <a href="trait.Value.html#tymethod.record" title="method tracing_core::field::Value::record"><code>Value::record</code></a> method on these
|
||||
trait objects with a <em>visitor</em> implementing the <a href="trait.Visit.html" title="trait tracing_core::field::Visit"><code>Visit</code></a> trait. This trait
|
||||
represents the behavior used to record values of various types. For example,
|
||||
an implementation of <code>Visit</code> might record integers by incrementing counters
|
||||
for their field names rather than printing them.</p>
|
||||
<h2 id="using-valuable"><a class="doc-anchor" href="#using-valuable">§</a>Using <code>valuable</code></h2>
|
||||
<p><code>tracing</code>’s <a href="trait.Value.html" title="trait tracing_core::field::Value"><code>Value</code></a> trait is intentionally minimalist: it supports only a small
|
||||
number of Rust primitives as typed values, and only permits recording
|
||||
user-defined types with their <a href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug"><code>fmt::Debug</code></a> or <a href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Display.html" title="trait core::fmt::Display"><code>fmt::Display</code></a>
|
||||
implementations. However, there are some cases where it may be useful to record
|
||||
nested values (such as arrays, <code>Vec</code>s, or <code>HashMap</code>s containing values), or
|
||||
user-defined <code>struct</code> and <code>enum</code> types without having to format them as
|
||||
unstructured text.</p>
|
||||
<p>To address <code>Value</code>’s limitations, <code>tracing</code> offers experimental support for
|
||||
the <a href="https://crates.io/crates/valuable"><code>valuable</code></a> crate, which provides object-safe inspection of structured
|
||||
values. User-defined types can implement the [<code>valuable::Valuable</code>] trait,
|
||||
and be recorded as a <code>tracing</code> field by calling their <a href="valuable::Valuable::as_value"><code>as_value</code></a> method.
|
||||
If the <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a> also supports the <code>valuable</code> crate, it can
|
||||
then visit those types fields as structured values using <code>valuable</code>.</p>
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>: <code>valuable</code> support is an
|
||||
<a href = "../index.html#unstable-features">unstable feature</a>. See
|
||||
the documentation on unstable features for details on how to enable it.
|
||||
</pre>
|
||||
<p>For example:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="comment">// Derive `Valuable` for our types:
|
||||
</span><span class="kw">use </span>valuable::Valuable;
|
||||
|
||||
<span class="attr">#[derive(Clone, Debug, Valuable)]
|
||||
</span><span class="kw">struct </span>User {
|
||||
name: String,
|
||||
age: u32,
|
||||
address: Address,
|
||||
}
|
||||
|
||||
<span class="attr">#[derive(Clone, Debug, Valuable)]
|
||||
</span><span class="kw">struct </span>Address {
|
||||
country: String,
|
||||
city: String,
|
||||
street: String,
|
||||
}
|
||||
|
||||
<span class="kw">let </span>user = User {
|
||||
name: <span class="string">"Arwen Undomiel"</span>.to_string(),
|
||||
age: <span class="number">3000</span>,
|
||||
address: Address {
|
||||
country: <span class="string">"Middle Earth"</span>.to_string(),
|
||||
city: <span class="string">"Rivendell"</span>.to_string(),
|
||||
street: <span class="string">"leafy lane"</span>.to_string(),
|
||||
},
|
||||
};
|
||||
|
||||
<span class="comment">// Recording `user` as a `valuable::Value` will allow the `tracing` subscriber
|
||||
// to traverse its fields as a nested, typed structure:
|
||||
</span><span class="macro">tracing::info!</span>(current_user = user.as_value());</code></pre></div>
|
||||
<p>Alternatively, the [<code>valuable()</code>] function may be used to convert a type
|
||||
implementing <a href="https://crates.io/crates/valuable"><code>Valuable</code></a> into a <code>tracing</code> field value.</p>
|
||||
<p>When the <code>valuable</code> feature is enabled, the <a href="trait.Visit.html" title="trait tracing_core::field::Visit"><code>Visit</code></a> trait will include an
|
||||
optional <a href="Visit::record_value"><code>record_value</code></a> method. <code>Visit</code> implementations that wish to
|
||||
record <code>valuable</code> values can implement this method with custom behavior.
|
||||
If a visitor does not implement <code>record_value</code>, the [<code>valuable::Value</code>] will
|
||||
be forwarded to the visitor’s <a href="trait.Visit.html#tymethod.record_debug" title="method tracing_core::field::Visit::record_debug"><code>record_debug</code></a> method.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.DebugValue.html" title="struct tracing_core::field::DebugValue">Debug<wbr>Value</a></div><div class="desc docblock-short">A <code>Value</code> which serializes as a string using <code>fmt::Debug</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.DisplayValue.html" title="struct tracing_core::field::DisplayValue">Display<wbr>Value</a></div><div class="desc docblock-short">A <code>Value</code> which serializes using <code>fmt::Display</code>.</div></li><li><div class="item-name"><a class="struct" href="struct.Empty.html" title="struct tracing_core::field::Empty">Empty</a></div><div class="desc docblock-short">An empty field.</div></li><li><div class="item-name"><a class="struct" href="struct.Field.html" title="struct tracing_core::field::Field">Field</a></div><div class="desc docblock-short">An opaque key allowing <em>O</em>(1) access to a field in a <code>Span</code>’s key-value
|
||||
data.</div></li><li><div class="item-name"><a class="struct" href="struct.FieldSet.html" title="struct tracing_core::field::FieldSet">Field<wbr>Set</a></div><div class="desc docblock-short">Describes the fields present on a span.</div></li><li><div class="item-name"><a class="struct" href="struct.Iter.html" title="struct tracing_core::field::Iter">Iter</a></div><div class="desc docblock-short">An iterator over a set of fields.</div></li><li><div class="item-name"><a class="struct" href="struct.ValueSet.html" title="struct tracing_core::field::ValueSet">Value<wbr>Set</a></div><div class="desc docblock-short">A set of fields and values for a span.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Value.html" title="trait tracing_core::field::Value">Value</a></div><div class="desc docblock-short">A field value of an erased type.</div></li><li><div class="item-name"><a class="trait" href="trait.Visit.html" title="trait tracing_core::field::Visit">Visit</a></div><div class="desc docblock-short">Visits typed values.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.debug.html" title="fn tracing_core::field::debug">debug</a></div><div class="desc docblock-short">Wraps a type implementing <code>fmt::Debug</code> as a <code>Value</code> that can be
|
||||
recorded using its <code>Debug</code> implementation.</div></li><li><div class="item-name"><a class="fn" href="fn.display.html" title="fn tracing_core::field::display">display</a></div><div class="desc docblock-short">Wraps a type implementing <code>fmt::Display</code> as a <code>Value</code> that can be
|
||||
recorded using its <code>Display</code> implementation.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/field/sidebar-items.js
Normal file
1
tracing_core/field/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"fn":["debug","display"],"struct":["DebugValue","DisplayValue","Empty","Field","FieldSet","Iter","ValueSet"],"trait":["Value","Visit"]};
|
||||
21
tracing_core/field/struct.DebugValue.html
Normal file
21
tracing_core/field/struct.DebugValue.html
Normal file
File diff suppressed because one or more lines are too long
24
tracing_core/field/struct.DisplayValue.html
Normal file
24
tracing_core/field/struct.DisplayValue.html
Normal file
File diff suppressed because one or more lines are too long
16
tracing_core/field/struct.Empty.html
Normal file
16
tracing_core/field/struct.Empty.html
Normal file
File diff suppressed because one or more lines are too long
29
tracing_core/field/struct.Field.html
Normal file
29
tracing_core/field/struct.Field.html
Normal file
File diff suppressed because one or more lines are too long
33
tracing_core/field/struct.FieldSet.html
Normal file
33
tracing_core/field/struct.FieldSet.html
Normal file
File diff suppressed because one or more lines are too long
191
tracing_core/field/struct.Iter.html
Normal file
191
tracing_core/field/struct.Iter.html
Normal file
File diff suppressed because one or more lines are too long
19
tracing_core/field/struct.ValueSet.html
Normal file
19
tracing_core/field/struct.ValueSet.html
Normal file
File diff suppressed because one or more lines are too long
14
tracing_core/field/trait.Value.html
Normal file
14
tracing_core/field/trait.Value.html
Normal file
File diff suppressed because one or more lines are too long
98
tracing_core/field/trait.Visit.html
Normal file
98
tracing_core/field/trait.Visit.html
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<!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="Visits typed values."><title>Visit in tracing_core::field - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Visit</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.record_debug" title="record_debug">record_debug</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.record_bool" title="record_bool">record_bool</a></li><li><a href="#method.record_bytes" title="record_bytes">record_bytes</a></li><li><a href="#method.record_error" title="record_error">record_error</a></li><li><a href="#method.record_f64" title="record_f64">record_f64</a></li><li><a href="#method.record_i128" title="record_i128">record_i128</a></li><li><a href="#method.record_i64" title="record_i64">record_i64</a></li><li><a href="#method.record_str" title="record_str">record_str</a></li><li><a href="#method.record_u128" title="record_u128">record_u128</a></li><li><a href="#method.record_u64" title="record_u64">record_u64</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Visit-for-DebugMap%3C'a,+'b%3E" title="DebugMap<'a, 'b>">DebugMap<'a, 'b></a></li><li><a href="#impl-Visit-for-DebugStruct%3C'a,+'b%3E" title="DebugStruct<'a, 'b>">DebugStruct<'a, 'b></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In tracing_<wbr>core::<wbr>field</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a>::<wbr><a href="index.html">field</a></span><h1>Trait <span class="trait">Visit</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/field.rs.html#266-332">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Visit {
|
||||
// Required method
|
||||
fn <a href="#tymethod.record_debug" class="fn">record_debug</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>);
|
||||
|
||||
// Provided methods
|
||||
fn <a href="#method.record_f64" class="fn">record_f64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_i64" class="fn">record_i64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_u64" class="fn">record_u64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_i128" class="fn">record_i128</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_u128" class="fn">record_u128</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_bool" class="fn">record_bool</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.bool.html">bool</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_str" class="fn">record_str</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.str.html">str</a>) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_bytes" class="fn">record_bytes</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>]) { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.record_error" class="fn">record_error</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &(dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)) { ... }
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Visits typed values.</p>
|
||||
<p>An instance of <code>Visit</code> (“a visitor”) represents the logic necessary to
|
||||
record field values of various types. When an implementor of <a href="trait.Value.html" title="trait tracing_core::field::Value"><code>Value</code></a> is
|
||||
<a href="trait.Value.html#tymethod.record" title="method tracing_core::field::Value::record">recorded</a>, it calls the appropriate method on the provided visitor to
|
||||
indicate the type that value should be recorded as.</p>
|
||||
<p>When a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a> implementation <a href="../trait.Subscriber.html#tymethod.event" title="method tracing_core::Subscriber::event">records an <code>Event</code></a> or a
|
||||
<a href="../trait.Subscriber.html#tymethod.record" title="method tracing_core::Subscriber::record">set of <code>Value</code>s added to a <code>Span</code></a>, it can pass an <code>&mut Visit</code> to the
|
||||
<code>record</code> method on the provided <a href="struct.ValueSet.html" title="struct tracing_core::field::ValueSet"><code>ValueSet</code></a> or <a href="../struct.Event.html" title="struct tracing_core::Event"><code>Event</code></a>. This visitor
|
||||
will then be used to record all the field-value pairs present on that
|
||||
<code>Event</code> or <code>ValueSet</code>.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>A simple visitor that writes to a string might be implemented like so:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::fmt::{<span class="self">self</span>, Write};
|
||||
<span class="kw">use </span>tracing::field::{Value, Visit, Field};
|
||||
<span class="kw">pub struct </span>StringVisitor<<span class="lifetime">'a</span>> {
|
||||
string: <span class="kw-2">&</span><span class="lifetime">'a </span><span class="kw-2">mut </span>String,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><<span class="lifetime">'a</span>> Visit <span class="kw">for </span>StringVisitor<<span class="lifetime">'a</span>> {
|
||||
<span class="kw">fn </span>record_debug(<span class="kw-2">&mut </span><span class="self">self</span>, field: <span class="kw-2">&</span>Field, value: <span class="kw-2">&</span><span class="kw">dyn </span>fmt::Debug) {
|
||||
<span class="macro">write!</span>(<span class="self">self</span>.string, <span class="string">"{} = {:?}; "</span>, field.name(), value).unwrap();
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>This visitor will format each recorded value using <code>fmt::Debug</code>, and
|
||||
append the field name and formatted value to the provided string,
|
||||
regardless of the type of the recorded value. When all the values have
|
||||
been recorded, the <code>StringVisitor</code> may be dropped, allowing the string
|
||||
to be printed or stored in some other data structure.</p>
|
||||
<p>The <code>Visit</code> trait provides default implementations for <code>record_i64</code>,
|
||||
<code>record_u64</code>, <code>record_bool</code>, <code>record_str</code>, and <code>record_error</code>, which simply
|
||||
forward the recorded value to <code>record_debug</code>. Thus, <code>record_debug</code> is the
|
||||
only method which a <code>Visit</code> implementation <em>must</em> implement. However,
|
||||
visitors may override the default implementations of these functions in
|
||||
order to implement type-specific behavior.</p>
|
||||
<p>Additionally, when a visitor receives a value of a type it does not care
|
||||
about, it is free to ignore those values completely. For example, a
|
||||
visitor which only records numeric data might look like this:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">pub struct </span>SumVisitor {
|
||||
sum: i64,
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>Visit <span class="kw">for </span>SumVisitor {
|
||||
<span class="kw">fn </span>record_i64(<span class="kw-2">&mut </span><span class="self">self</span>, _field: <span class="kw-2">&</span>Field, value: i64) {
|
||||
<span class="self">self</span>.sum += value;
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>record_u64(<span class="kw-2">&mut </span><span class="self">self</span>, _field: <span class="kw-2">&</span>Field, value: u64) {
|
||||
<span class="self">self</span>.sum += value <span class="kw">as </span>i64;
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>record_debug(<span class="kw-2">&mut </span><span class="self">self</span>, _field: <span class="kw-2">&</span>Field, _value: <span class="kw-2">&</span>fmt::Debug) {
|
||||
<span class="comment">// Do nothing
|
||||
</span>}
|
||||
}</code></pre></div>
|
||||
<p>This visitor (which is probably not particularly useful) keeps a running
|
||||
sum of all the numeric values it records, and ignores all other values. A
|
||||
more practical example of recording typed values is presented in
|
||||
<code>examples/counters.rs</code>, which demonstrates a very simple metrics system
|
||||
implemented using <code>tracing</code>.</p>
|
||||
<div class="example-wrap" style="display:inline-block">
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>: The <code>record_error</code> trait method is only
|
||||
available when the Rust standard library is present, as it requires the
|
||||
<code>std::error::Error</code> trait.
|
||||
</pre></div>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.record_debug" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#331">Source</a><h4 class="code-header">fn <a href="#tymethod.record_debug" class="fn">record_debug</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>)</h4></section></summary><div class="docblock"><p>Visit a value implementing <code>fmt::Debug</code>.</p>
|
||||
</div></details></div><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.record_f64" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#277-279">Source</a><h4 class="code-header">fn <a href="#method.record_f64" class="fn">record_f64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.f64.html">f64</a>)</h4></section></summary><div class="docblock"><p>Visit a double-precision floating point value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_i64" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#282-284">Source</a><h4 class="code-header">fn <a href="#method.record_i64" class="fn">record_i64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i64.html">i64</a>)</h4></section></summary><div class="docblock"><p>Visit a signed 64-bit integer value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_u64" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#287-289">Source</a><h4 class="code-header">fn <a href="#method.record_u64" class="fn">record_u64</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Visit an unsigned 64-bit integer value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_i128" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#292-294">Source</a><h4 class="code-header">fn <a href="#method.record_i128" class="fn">record_i128</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.i128.html">i128</a>)</h4></section></summary><div class="docblock"><p>Visit a signed 128-bit integer value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_u128" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#297-299">Source</a><h4 class="code-header">fn <a href="#method.record_u128" class="fn">record_u128</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u128.html">u128</a>)</h4></section></summary><div class="docblock"><p>Visit an unsigned 128-bit integer value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_bool" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#302-304">Source</a><h4 class="code-header">fn <a href="#method.record_bool" class="fn">record_bool</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Visit a boolean value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_str" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#307-309">Source</a><h4 class="code-header">fn <a href="#method.record_str" class="fn">record_str</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.str.html">str</a>)</h4></section></summary><div class="docblock"><p>Visit a string value.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_bytes" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#312-314">Source</a><h4 class="code-header">fn <a href="#method.record_bytes" class="fn">record_bytes</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.1/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Visit a byte slice.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.record_error" class="method"><a class="src rightside" href="../../src/tracing_core/field.rs.html#326-328">Source</a><h4 class="code-header">fn <a href="#method.record_error" class="fn">record_error</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &(dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static))</h4></section></summary><div class="docblock"><p>Records a type implementing <code>Error</code>.</p>
|
||||
<div class="example-wrap" style="display:inline-block">
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<strong>Note</strong>: This is only enabled when the Rust standard library is
|
||||
present.
|
||||
</pre>
|
||||
</div></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-Visit-for-DebugMap%3C'a,+'b%3E" class="impl"><a class="src rightside" href="../../src/tracing_core/field.rs.html#416-420">Source</a><a href="#impl-Visit-for-DebugMap%3C'a,+'b%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="trait.Visit.html" title="trait tracing_core::field::Visit">Visit</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/fmt/builders/struct.DebugMap.html" title="struct core::fmt::builders::DebugMap">DebugMap</a><'a, 'b></h3></section></summary><div class="impl-items"><section id="method.record_debug" class="method trait-impl"><a class="src rightside" href="../../src/tracing_core/field.rs.html#417-419">Source</a><a href="#method.record_debug" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record_debug" class="fn">record_debug</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Visit-for-DebugStruct%3C'a,+'b%3E" class="impl"><a class="src rightside" href="../../src/tracing_core/field.rs.html#410-414">Source</a><a href="#impl-Visit-for-DebugStruct%3C'a,+'b%3E" class="anchor">§</a><h3 class="code-header">impl<'a, 'b> <a class="trait" href="trait.Visit.html" title="trait tracing_core::field::Visit">Visit</a> for <a class="struct" href="https://doc.rust-lang.org/1.84.1/core/fmt/builders/struct.DebugStruct.html" title="struct core::fmt::builders::DebugStruct">DebugStruct</a><'a, 'b></h3></section></summary><div class="impl-items"><section id="method.record_debug-1" class="method trait-impl"><a class="src rightside" href="../../src/tracing_core/field.rs.html#411-413">Source</a><a href="#method.record_debug-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record_debug" class="fn">record_debug</a>(&mut self, field: &<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, value: &dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>)</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-Visit-for-F" class="impl"><a class="src rightside" href="../../src/tracing_core/field.rs.html#422-429">Source</a><a href="#impl-Visit-for-F" class="anchor">§</a><h3 class="code-header">impl<F> <a class="trait" href="trait.Visit.html" title="trait tracing_core::field::Visit">Visit</a> for F<div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&<a class="struct" href="../struct.Field.html" title="struct tracing_core::Field">Field</a>, &dyn <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>),</div></h3></section></div><script src="../../trait.impl/tracing_core/field/trait.Visit.js" data-ignore-extern-crates="core" async></script></section></div></main></body></html>
|
||||
84
tracing_core/index.html
Normal file
84
tracing_core/index.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<!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="Core primitives for `tracing`."><title>tracing_core - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#usage" title="Usage">Usage</a></li><li><a href="#crate-feature-flags" title="Crate Feature Flags">Crate Feature Flags</a><ul><li><a href="#unstable-features" title="Unstable Features">Unstable Features</a></li></ul></li><li><a href="#supported-rust-versions" title="Supported Rust Versions">Supported Rust Versions</a></li></ul><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"></div></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>Crate <span>tracing_core</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/tracing_core/lib.rs.html#1-302">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Core primitives for <code>tracing</code>.</p>
|
||||
<p><a href="https://crates.io/crates/tracing"><code>tracing</code></a> is a framework for instrumenting Rust programs to collect
|
||||
structured, event-based diagnostic information. This crate defines the core
|
||||
primitives of <code>tracing</code>.</p>
|
||||
<p>This crate provides:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="span/struct.Id.html" title="struct tracing_core::span::Id"><code>span::Id</code></a> identifies a span within the execution of a program.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="struct.Event.html" title="struct tracing_core::Event"><code>Event</code></a> represents a single event within a trace.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>, the trait implemented to collect trace data.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a> and <a href="trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a> provide information describing spans and
|
||||
<code>Event</code>s.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="struct.Field.html" title="struct tracing_core::Field"><code>Field</code></a>, <a href="field/struct.FieldSet.html" title="struct tracing_core::field::FieldSet"><code>FieldSet</code></a>, <a href="field/trait.Value.html" title="trait tracing_core::field::Value"><code>Value</code></a>, and <a href="field/struct.ValueSet.html" title="struct tracing_core::field::ValueSet"><code>ValueSet</code></a> represent the
|
||||
structured data attached to a span.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="struct.Dispatch.html" title="struct tracing_core::Dispatch"><code>Dispatch</code></a> allows spans and events to be dispatched to <code>Subscriber</code>s.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>In addition, it defines the global callsite registry and per-thread current
|
||||
dispatcher which other components of the tracing system rely on.</p>
|
||||
<p><em>Compiler support: <a href="#supported-rust-versions">requires <code>rustc</code> 1.63+</a></em></p>
|
||||
<h3 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h3>
|
||||
<p>Application authors will typically not use this crate directly. Instead,
|
||||
they will use the <a href="https://crates.io/crates/tracing"><code>tracing</code></a> crate, which provides a much more
|
||||
fully-featured API. However, this crate’s API will change very infrequently,
|
||||
so it may be used when dependencies must be very stable.</p>
|
||||
<p><code>Subscriber</code> implementations may depend on <code>tracing-core</code> rather than
|
||||
<code>tracing</code>, as the additional APIs provided by <code>tracing</code> are primarily useful
|
||||
for instrumenting libraries and applications, and are generally not
|
||||
necessary for <code>Subscriber</code> implementations.</p>
|
||||
<p>The <a href="https://github.com/tokio-rs/tracing"><code>tokio-rs/tracing</code></a> repository contains less stable crates designed to
|
||||
be used with the <code>tracing</code> ecosystem. It includes a collection of
|
||||
<code>Subscriber</code> implementations, as well as utility and adapter crates.</p>
|
||||
<h3 id="crate-feature-flags"><a class="doc-anchor" href="#crate-feature-flags">§</a>Crate Feature Flags</h3>
|
||||
<p>The following crate <a href="https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section">feature flags</a> are available:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>std</code>: Depend on the Rust standard library (enabled by default).</p>
|
||||
<p><code>no_std</code> users may disable this feature with <code>default-features = false</code>:</p>
|
||||
<div class="example-wrap"><pre class="language-toml"><code>[dependencies]
|
||||
tracing-core = { version = "0.1.22", default-features = false }</code></pre></div>
|
||||
<p><strong>Note</strong>:<code>tracing-core</code>’s <code>no_std</code> support requires <code>liballoc</code>.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="unstable-features"><a class="doc-anchor" href="#unstable-features">§</a>Unstable Features</h4>
|
||||
<p>These feature flags enable <strong>unstable</strong> features. The public API may break in 0.1.x
|
||||
releases. To enable these features, the <code>--cfg tracing_unstable</code> must be passed to
|
||||
<code>rustc</code> when compiling.</p>
|
||||
<p>The following unstable feature flags are currently available:</p>
|
||||
<ul>
|
||||
<li><code>valuable</code>: Enables support for recording <a href="field/index.html" title="mod tracing_core::field">field values</a> using the
|
||||
<a href="https://crates.io/crates/valuable"><code>valuable</code></a> crate.</li>
|
||||
</ul>
|
||||
<h5 id="enabling-unstable-features"><a class="doc-anchor" href="#enabling-unstable-features">§</a>Enabling Unstable Features</h5>
|
||||
<p>The easiest way to set the <code>tracing_unstable</code> cfg is to use the <code>RUSTFLAGS</code>
|
||||
env variable when running <code>cargo</code> commands:</p>
|
||||
<div class="example-wrap"><pre class="language-shell"><code>RUSTFLAGS="--cfg tracing_unstable" cargo build</code></pre></div>
|
||||
<p>Alternatively, the following can be added to the <code>.cargo/config</code> file in a
|
||||
project to automatically enable the cfg flag for that project:</p>
|
||||
<div class="example-wrap"><pre class="language-toml"><code>[build]
|
||||
rustflags = ["--cfg", "tracing_unstable"]</code></pre></div><h3 id="supported-rust-versions"><a class="doc-anchor" href="#supported-rust-versions">§</a>Supported Rust Versions</h3>
|
||||
<p>Tracing is built against the latest stable release. The minimum supported
|
||||
version is 1.63. The current Tracing version is not guaranteed to build on
|
||||
Rust versions earlier than the minimum supported version.</p>
|
||||
<p>Tracing follows the same compiler support policies as the rest of the Tokio
|
||||
project. The current stable Rust compiler and the three most recent minor
|
||||
versions before it will always be supported. For example, if the current
|
||||
stable compiler version is 1.69, the minimum supported version will not be
|
||||
increased past 1.66, three minor versions prior. Increasing the minimum
|
||||
supported compiler version is not considered a semver breaking change as
|
||||
long as doing so complies with this policy.</p>
|
||||
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.Kind"><code>pub use self::metadata::<a class="struct" href="metadata/struct.Kind.html" title="struct tracing_core::metadata::Kind">Kind</a>;</code></div></li><li><div class="item-name" id="reexport.Interest"><code>pub use self::subscriber::<a class="struct" href="subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="callsite/index.html" title="mod tracing_core::callsite">callsite</a></div><div class="desc docblock-short">Callsites represent the source locations from which spans or events
|
||||
originate.</div></li><li><div class="item-name"><a class="mod" href="dispatcher/index.html" title="mod tracing_core::dispatcher">dispatcher</a></div><div class="desc docblock-short">Dispatches trace events to <a href="trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>s.</div></li><li><div class="item-name"><a class="mod" href="event/index.html" title="mod tracing_core::event">event</a></div><div class="desc docblock-short">Events represent single points in time during the execution of a program.</div></li><li><div class="item-name"><a class="mod" href="field/index.html" title="mod tracing_core::field">field</a></div><div class="desc docblock-short"><code>Span</code> and <code>Event</code> key-value data.</div></li><li><div class="item-name"><a class="mod" href="metadata/index.html" title="mod tracing_core::metadata">metadata</a></div><div class="desc docblock-short">Metadata describing trace data.</div></li><li><div class="item-name"><a class="mod" href="span/index.html" title="mod tracing_core::span">span</a></div><div class="desc docblock-short">Spans represent periods of time in the execution of a program.</div></li><li><div class="item-name"><a class="mod" href="subscriber/index.html" title="mod tracing_core::subscriber">subscriber</a></div><div class="desc docblock-short">Collectors collect and record trace data.</div></li></ul><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="macro" href="macro.identify_callsite.html" title="macro tracing_core::identify_callsite">identify_<wbr>callsite</a></div><div class="desc docblock-short">Statically constructs an <a href="callsite/struct.Identifier.html" title="struct tracing_core::callsite::Identifier"><code>Identifier</code></a> for the provided <a href="trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a>.</div></li><li><div class="item-name"><a class="macro" href="macro.metadata.html" title="macro tracing_core::metadata">metadata</a></div><div class="desc docblock-short">Statically constructs new span <a href="struct.Metadata.html" title="struct tracing_core::Metadata">metadata</a>.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Dispatch.html" title="struct tracing_core::Dispatch">Dispatch</a></div><div class="desc docblock-short"><code>Dispatch</code> trace data to a <a href="trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Event.html" title="struct tracing_core::Event">Event</a></div><div class="desc docblock-short"><code>Event</code>s represent single points in time where something occurred during the
|
||||
execution of a program.</div></li><li><div class="item-name"><a class="struct" href="struct.Field.html" title="struct tracing_core::Field">Field</a></div><div class="desc docblock-short">An opaque key allowing <em>O</em>(1) access to a field in a <code>Span</code>’s key-value
|
||||
data.</div></li><li><div class="item-name"><a class="struct" href="struct.Level.html" title="struct tracing_core::Level">Level</a></div><div class="desc docblock-short">Describes the level of verbosity of a span or event.</div></li><li><div class="item-name"><a class="struct" href="struct.LevelFilter.html" title="struct tracing_core::LevelFilter">Level<wbr>Filter</a></div><div class="desc docblock-short">A filter comparable to a verbosity <a href="struct.Level.html" title="struct tracing_core::Level"><code>Level</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a></div><div class="desc docblock-short">Metadata describing a <a href="span/index.html" title="mod tracing_core::span">span</a> or <a href="event/index.html" title="mod tracing_core::event">event</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Once.html" title="struct tracing_core::Once">Once</a></div><div class="desc docblock-short">A low-level synchronization primitive for one-time global execution.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Callsite.html" title="trait tracing_core::Callsite">Callsite</a></div><div class="desc docblock-short">Trait implemented by callsites.</div></li><li><div class="item-name"><a class="trait" href="trait.Subscriber.html" title="trait tracing_core::Subscriber">Subscriber</a></div><div class="desc docblock-short">Trait representing the functions required to collect trace data.</div></li></ul></section></div></main></body></html>
|
||||
11
tracing_core/macro.identify_callsite!.html
Normal file
11
tracing_core/macro.identify_callsite!.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.identify_callsite.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.identify_callsite.html">macro.identify_callsite.html</a>...</p>
|
||||
<script>location.replace("macro.identify_callsite.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
20
tracing_core/macro.identify_callsite.html
Normal file
20
tracing_core/macro.identify_callsite.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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="Statically constructs an `Identifier` for the provided `Callsite`."><title>identify_callsite in tracing_core - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></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"><span class="rustdoc-breadcrumbs"><a href="index.html">tracing_core</a></span><h1>Macro <span class="macro">identify_callsite</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/tracing_core/lib.rs.html#187-191">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! identify_callsite {
|
||||
($callsite:expr) => { ... };
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Statically constructs an <a href="callsite/struct.Identifier.html" title="struct tracing_core::callsite::Identifier"><code>Identifier</code></a> for the provided <a href="trait.Callsite.html" title="trait tracing_core::Callsite"><code>Callsite</code></a>.</p>
|
||||
<p>This may be used in contexts such as static initializers.</p>
|
||||
<p>For example:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tracing_core::{callsite, identify_callsite};
|
||||
<span class="kw">pub struct </span>MyCallsite {
|
||||
<span class="comment">// ...
|
||||
</span>}
|
||||
<span class="kw">impl </span>callsite::Callsite <span class="kw">for </span>MyCallsite {
|
||||
<span class="comment">// ...
|
||||
</span>}
|
||||
|
||||
<span class="kw">static </span>CALLSITE: MyCallsite = MyCallsite {
|
||||
<span class="comment">// ...
|
||||
</span>};
|
||||
|
||||
<span class="kw">static </span>CALLSITE_ID: callsite::Identifier = <span class="macro">identify_callsite!</span>(<span class="kw-2">&</span>CALLSITE);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
11
tracing_core/macro.metadata!.html
Normal file
11
tracing_core/macro.metadata!.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.metadata.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.metadata.html">macro.metadata.html</a>...</p>
|
||||
<script>location.replace("macro.metadata.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
35
tracing_core/macro.metadata.html
Normal file
35
tracing_core/macro.metadata.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!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="Statically constructs new span metadata."><title>metadata in tracing_core - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></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"><span class="rustdoc-breadcrumbs"><a href="index.html">tracing_core</a></span><h1>Macro <span class="macro">metadata</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/tracing_core/lib.rs.html#225-262">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! metadata {
|
||||
(
|
||||
name: $name:expr,
|
||||
target: $target:expr,
|
||||
level: $level:expr,
|
||||
fields: $fields:expr,
|
||||
callsite: $callsite:expr,
|
||||
kind: $kind:expr
|
||||
) => { ... };
|
||||
(
|
||||
name: $name:expr,
|
||||
target: $target:expr,
|
||||
level: $level:expr,
|
||||
fields: $fields:expr,
|
||||
callsite: $callsite:expr,
|
||||
kind: $kind:expr,
|
||||
) => { ... };
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Statically constructs new span <a href="struct.Metadata.html" title="struct tracing_core::Metadata">metadata</a>.</p>
|
||||
<p>/// For example:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>tracing_core::metadata;
|
||||
<span class="kw">use </span>tracing_core::metadata::{Kind, Level, Metadata};
|
||||
<span class="kw">static </span>FOO_CALLSITE: MyCallsite = MyCallsite {
|
||||
<span class="comment">// ...
|
||||
</span>};
|
||||
|
||||
<span class="kw">static </span>FOO_METADATA: Metadata = <span class="macro">metadata!</span>{
|
||||
name: <span class="string">"foo"</span>,
|
||||
target: <span class="macro">module_path!</span>(),
|
||||
level: Level::DEBUG,
|
||||
fields: <span class="kw-2">&</span>[<span class="string">"bar"</span>, <span class="string">"baz"</span>],
|
||||
callsite: <span class="kw-2">&</span>FOO_CALLSITE,
|
||||
kind: Kind::SPAN,
|
||||
};</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
||||
2
tracing_core/metadata/index.html
Normal file
2
tracing_core/metadata/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Metadata describing trace data."><title>tracing_core::metadata - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module metadata</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>metadata</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/metadata.rs.html#1-1114">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Metadata describing trace data.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Kind.html" title="struct tracing_core::metadata::Kind">Kind</a></div><div class="desc docblock-short">Indicates whether the callsite is a span or event.</div></li><li><div class="item-name"><a class="struct" href="struct.Level.html" title="struct tracing_core::metadata::Level">Level</a></div><div class="desc docblock-short">Describes the level of verbosity of a span or event.</div></li><li><div class="item-name"><a class="struct" href="struct.LevelFilter.html" title="struct tracing_core::metadata::LevelFilter">Level<wbr>Filter</a></div><div class="desc docblock-short">A filter comparable to a verbosity <a href="../struct.Level.html" title="struct tracing_core::Level"><code>Level</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.Metadata.html" title="struct tracing_core::metadata::Metadata">Metadata</a></div><div class="desc docblock-short">Metadata describing a <a href="../span/index.html" title="mod tracing_core::span">span</a> or <a href="../event/index.html" title="mod tracing_core::event">event</a>.</div></li><li><div class="item-name"><a class="struct" href="struct.ParseLevelError.html" title="struct tracing_core::metadata::ParseLevelError">Parse<wbr>Level<wbr>Error</a></div><div class="desc docblock-short">Returned if parsing a <code>Level</code> fails.</div></li><li><div class="item-name"><a class="struct" href="struct.ParseLevelFilterError.html" title="struct tracing_core::metadata::ParseLevelFilterError">Parse<wbr>Level<wbr>Filter<wbr>Error</a></div><div class="desc docblock-short">Indicates that a string could not be parsed to a valid level.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/metadata/sidebar-items.js
Normal file
1
tracing_core/metadata/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Kind","Level","LevelFilter","Metadata","ParseLevelError","ParseLevelFilterError"]};
|
||||
26
tracing_core/metadata/struct.Kind.html
Normal file
26
tracing_core/metadata/struct.Kind.html
Normal file
File diff suppressed because one or more lines are too long
141
tracing_core/metadata/struct.Level.html
Normal file
141
tracing_core/metadata/struct.Level.html
Normal file
File diff suppressed because one or more lines are too long
67
tracing_core/metadata/struct.LevelFilter.html
Normal file
67
tracing_core/metadata/struct.LevelFilter.html
Normal file
File diff suppressed because one or more lines are too long
74
tracing_core/metadata/struct.Metadata.html
Normal file
74
tracing_core/metadata/struct.Metadata.html
Normal file
File diff suppressed because one or more lines are too long
13
tracing_core/metadata/struct.ParseLevelError.html
Normal file
13
tracing_core/metadata/struct.ParseLevelError.html
Normal file
File diff suppressed because one or more lines are too long
15
tracing_core/metadata/struct.ParseLevelFilterError.html
Normal file
15
tracing_core/metadata/struct.ParseLevelFilterError.html
Normal file
File diff suppressed because one or more lines are too long
1
tracing_core/sidebar-items.js
Normal file
1
tracing_core/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"macro":["identify_callsite","metadata"],"mod":["callsite","dispatcher","event","field","metadata","span","subscriber"],"struct":["Dispatch","Event","Field","Level","LevelFilter","Metadata","Once"],"trait":["Callsite","Subscriber"]};
|
||||
3
tracing_core/span/index.html
Normal file
3
tracing_core/span/index.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<!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="Spans represent periods of time in the execution of a program."><title>tracing_core::span - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module span</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>span</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/span.rs.html#1-341">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Spans represent periods of time in the execution of a program.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Attributes.html" title="struct tracing_core::span::Attributes">Attributes</a></div><div class="desc docblock-short">Attributes provided to a <code>Subscriber</code> describing a new span when it is
|
||||
created.</div></li><li><div class="item-name"><a class="struct" href="struct.Current.html" title="struct tracing_core::span::Current">Current</a></div><div class="desc docblock-short">Indicates what <a href="../trait.Subscriber.html#method.current_span" title="method tracing_core::Subscriber::current_span">the <code>Subscriber</code> considers</a> the “current” span.</div></li><li><div class="item-name"><a class="struct" href="struct.Id.html" title="struct tracing_core::span::Id">Id</a></div><div class="desc docblock-short">Identifies a span within the context of a subscriber.</div></li><li><div class="item-name"><a class="struct" href="struct.Record.html" title="struct tracing_core::span::Record">Record</a></div><div class="desc docblock-short">A set of fields recorded by a span.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/span/sidebar-items.js
Normal file
1
tracing_core/span/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Attributes","Current","Id","Record"]};
|
||||
52
tracing_core/span/struct.Attributes.html
Normal file
52
tracing_core/span/struct.Attributes.html
Normal file
File diff suppressed because one or more lines are too long
34
tracing_core/span/struct.Current.html
Normal file
34
tracing_core/span/struct.Current.html
Normal file
File diff suppressed because one or more lines are too long
32
tracing_core/span/struct.Id.html
Normal file
32
tracing_core/span/struct.Id.html
Normal file
File diff suppressed because one or more lines are too long
18
tracing_core/span/struct.Record.html
Normal file
18
tracing_core/span/struct.Record.html
Normal file
File diff suppressed because one or more lines are too long
94
tracing_core/struct.Dispatch.html
Normal file
94
tracing_core/struct.Dispatch.html
Normal file
File diff suppressed because one or more lines are too long
57
tracing_core/struct.Event.html
Normal file
57
tracing_core/struct.Event.html
Normal file
File diff suppressed because one or more lines are too long
29
tracing_core/struct.Field.html
Normal file
29
tracing_core/struct.Field.html
Normal file
File diff suppressed because one or more lines are too long
141
tracing_core/struct.Level.html
Normal file
141
tracing_core/struct.Level.html
Normal file
File diff suppressed because one or more lines are too long
67
tracing_core/struct.LevelFilter.html
Normal file
67
tracing_core/struct.LevelFilter.html
Normal file
File diff suppressed because one or more lines are too long
74
tracing_core/struct.Metadata.html
Normal file
74
tracing_core/struct.Metadata.html
Normal file
File diff suppressed because one or more lines are too long
163
tracing_core/struct.Once.html
Normal file
163
tracing_core/struct.Once.html
Normal file
File diff suppressed because one or more lines are too long
2
tracing_core/subscriber/index.html
Normal file
2
tracing_core/subscriber/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!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="Collectors collect and record trace data."><title>tracing_core::subscriber - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module subscriber</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="../index.html">tracing_core</a></span><h1>Module <span>subscriber</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/tracing_core/subscriber.rs.html#1-878">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Collectors collect and record trace data.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a></div><div class="desc docblock-short">Indicates a <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>’s interest in a particular callsite.</div></li><li><div class="item-name"><a class="struct" href="struct.NoSubscriber.html" title="struct tracing_core::subscriber::NoSubscriber">NoSubscriber</a></div><div class="desc docblock-short">A no-op <a href="../trait.Subscriber.html" title="trait tracing_core::Subscriber"><code>Subscriber</code></a>.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.Subscriber.html" title="trait tracing_core::subscriber::Subscriber">Subscriber</a></div><div class="desc docblock-short">Trait representing the functions required to collect trace data.</div></li></ul></section></div></main></body></html>
|
||||
1
tracing_core/subscriber/sidebar-items.js
Normal file
1
tracing_core/subscriber/sidebar-items.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.SIDEBAR_ITEMS = {"struct":["Interest","NoSubscriber"],"trait":["Subscriber"]};
|
||||
36
tracing_core/subscriber/struct.Interest.html
Normal file
36
tracing_core/subscriber/struct.Interest.html
Normal file
File diff suppressed because one or more lines are too long
25
tracing_core/subscriber/struct.NoSubscriber.html
Normal file
25
tracing_core/subscriber/struct.NoSubscriber.html
Normal file
File diff suppressed because one or more lines are too long
352
tracing_core/subscriber/trait.Subscriber.html
Normal file
352
tracing_core/subscriber/trait.Subscriber.html
Normal file
File diff suppressed because one or more lines are too long
20
tracing_core/trait.Callsite.html
Normal file
20
tracing_core/trait.Callsite.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!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 implemented by callsites."><title>Callsite in tracing_core - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.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-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="tracing_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.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_core/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_core/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../tracing_core/index.html">tracing_<wbr>core</a><span class="version">0.1.33</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Callsite</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.metadata" title="metadata">metadata</a></li><li><a href="#tymethod.set_interest" title="set_interest">set_interest</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate tracing_<wbr>core</a></h2></div></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"><span class="rustdoc-breadcrumbs"><a href="index.html">tracing_core</a></span><h1>Trait <span class="trait">Callsite</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/tracing_core/callsite.rs.html#126-171">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Callsite: <a class="trait" href="https://doc.rust-lang.org/1.84.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.set_interest" class="fn">set_interest</a>(&self, interest: <a class="struct" href="subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a>);
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.metadata" class="fn">metadata</a>(&self) -> &<a class="struct" href="struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a><'_>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait implemented by callsites.</p>
|
||||
<p>These functions are only intended to be called by the callsite registry, which
|
||||
correctly handles determining the common interest between all subscribers.</p>
|
||||
<p>See the <a href="callsite/index.html" title="mod tracing_core::callsite">module-level documentation</a> for details on
|
||||
callsites.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.set_interest" class="method"><a class="src rightside" href="../src/tracing_core/callsite.rs.html#134">Source</a><h4 class="code-header">fn <a href="#tymethod.set_interest" class="fn">set_interest</a>(&self, interest: <a class="struct" href="subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest">Interest</a>)</h4></section></summary><div class="docblock"><p>Sets the <a href="subscriber/struct.Interest.html" title="struct tracing_core::subscriber::Interest"><code>Interest</code></a> for this callsite.</p>
|
||||
<p>See the <a href="callsite/index.html#performing-static-filtering" title="mod tracing_core::callsite">documentation on callsite interest caching</a> for
|
||||
details.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.metadata" class="method"><a class="src rightside" href="../src/tracing_core/callsite.rs.html#148">Source</a><h4 class="code-header">fn <a href="#tymethod.metadata" class="fn">metadata</a>(&self) -> &<a class="struct" href="struct.Metadata.html" title="struct tracing_core::Metadata">Metadata</a><'_></h4></section></summary><div class="docblock"><p>Returns the <a href="struct.Metadata.html" title="struct tracing_core::Metadata">metadata</a> associated with the callsite.</p>
|
||||
<div class="example-wrap" style="display:inline-block">
|
||||
<pre class="ignore" style="white-space:normal;font:inherit;">
|
||||
<p><strong>Note:</strong> Implementations of this method should not produce <a href="struct.Metadata.html" title="struct tracing_core::Metadata"><code>Metadata</code></a>
|
||||
that share the same callsite <a href="callsite/struct.Identifier.html" title="struct tracing_core::callsite::Identifier"><code>Identifier</code></a> but otherwise differ in any
|
||||
way (e.g., have different <code>name</code>s).</p>
|
||||
<p></pre></div></p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Callsite-for-DefaultCallsite" class="impl"><a class="src rightside" href="../src/tracing_core/callsite.rs.html#358-372">Source</a><a href="#impl-Callsite-for-DefaultCallsite" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Callsite.html" title="trait tracing_core::Callsite">Callsite</a> for <a class="struct" href="callsite/struct.DefaultCallsite.html" title="struct tracing_core::callsite::DefaultCallsite">DefaultCallsite</a></h3></section></div><script src="../trait.impl/tracing_core/callsite/trait.Callsite.js" async></script></section></div></main></body></html>
|
||||
352
tracing_core/trait.Subscriber.html
Normal file
352
tracing_core/trait.Subscriber.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue