edlang/tracing/trait.Value.html

16 lines
56 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A field value of an erased type."><title>Value in tracing - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="tracing" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../tracing/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/index.html"><img src="https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png" alt="logo"></a><h2><a href="../tracing/index.html">tracing</a><span class="version">0.1.40</span></h2></div><h2 class="location"><a href="#">Value</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.record">record</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Value-for-%26T">&amp;&#x27;a T</a></li><li><a href="#impl-Value-for-%26mut+T">&amp;&#x27;a mut T</a></li><li><a href="#impl-Value-for-Arguments%3C'a%3E">Arguments&lt;&#x27;a&gt;</a></li><li><a href="#impl-Value-for-Box%3CT%3E">Box&lt;T&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Ci128%3E">NonZero&lt;i128&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Ci16%3E">NonZero&lt;i16&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Ci32%3E">NonZero&lt;i32&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Ci64%3E">NonZero&lt;i64&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Ci8%3E">NonZero&lt;i8&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cisize%3E">NonZero&lt;isize&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cu128%3E">NonZero&lt;u128&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cu16%3E">NonZero&lt;u16&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cu32%3E">NonZero&lt;u32&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cu64%3E">NonZero&lt;u64&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cu8%3E">NonZero&lt;u8&gt;</a></li><li><a href="#impl-Value-for-NonZero%3Cusize%3E">NonZero&lt;usize&gt;</a></li><li><a href="#impl-Value-for-Option%3CT%3E">Option&lt;T&gt;</a></li><li><a href="#impl-Value-for-String">String</a></li><li><a href="#impl-Value-for-Wrapping%3CT%3E">Wrapping&lt;T&gt;</a></li><li><a href="#impl-Value-for-bool">bool</a></li><
// Required method
fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>);
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A field value of an erased type.</p>
<p>Implementors of <code>Value</code> may call the appropriate typed recording methods on
the <a href="field/trait.Visit.html" title="trait tracing::field::Visit">visitor</a> passed to their <code>record</code> method in order to indicate how
their data should be recorded.</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.record" class="method"><a class="src rightside" href="../src/tracing_core/field.rs.html#338">source</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>)</h4></section></summary><div class="docblock"><p>Visits this value with the given <code>Visitor</code>.</p>
</div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-dyn+Value" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#638">source</a><a href="#impl-Debug-for-dyn+Value" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for dyn <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#639">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-dyn+Value" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#667">source</a><a href="#impl-Display-for-dyn+Value" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for dyn <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#668">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Value-for-bool" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#517-526">source</a><a href="#impl-Value-for-bool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h3></section></su
T: <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> + 'a + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="method.record-34" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#593">source</a><a href="#method.record-34" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Value-for-%26mut+T" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#600-602">source</a><a href="#impl-Value-for-%26mut+T" class="anchor">§</a><h3 class="code-header">impl&lt;'a, T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;'a mut T</a><div class="where">where
T: <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> + 'a + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="method.record-35" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#604">source</a><a href="#method.record-35" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Value-for-Option%3CT%3E" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#749">source</a><a href="#impl-Value-for-Option%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a>,</div></h3></section></summary><div class="impl-items"><section id="method.record-36" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#750">source</a><a href="#method.record-36" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Value-for-Box%3CT%3E" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#621-623">source</a><a href="#impl-Value-for-Box%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="method.record-37" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#626">source</a><a href="#method.record-37" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Value-for-Wrapping%3CT%3E" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#529">source</a><a href="#impl-Value-for-Wrapping%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="struct" href="https://doc.rust-lang.org/1.80.0/core/num/wrapping/struct.Wrapping.html" title="struct core::num::wrapping::Wrapping">Wrapping</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a>,</div></h3></section></summary><div class="impl-items"><section id="method.record-38" class="method trait-impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#530">source</a><a href="#method.record-38" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.record" class="fn">record</a>(&amp;self, key: &amp;<a class="struct" href="field/struct.Field.html" title="struct tracing::field::Field">Field</a>, visitor: &amp;mut dyn <a class="trait" href="field/trait.Visit.html" title="trait tracing::field::Visit">Visit</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-Value-for-Empty" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#742">source</a><a href="#impl-Value-for-Empty" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="struct" href="field/struct.Empty.html" title="struct tracing::field::Empty">Empty</a></h3></section><section id="impl-Value-for-DebugValue%3CT%3E" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#702-704">source</a><a href="#impl-Value-for-DebugValue%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="struct" href="field/struct.DebugValue.html" title="struct tracing::field::DebugValue">DebugValue</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</div></h3></section><section id="impl-Value-for-DisplayValue%3CT%3E" class="impl"><a class="src rightside" href="../src/tracing_core/field.rs.html#677-679">source</a><a href="#impl-Value-for-DisplayValue%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.Value.html" title="trait tracing::Value">Value</a> for <a class="struct" href="field/struct.DisplayValue.html" title="struct tracing::field::DisplayValue">DisplayValue</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,</div></h3></section></div><script src="../trait.impl/tracing_core/field/trait.Value.js" data-ignore-extern-crates="alloc,core,tracing_core,std" async></script></section></div></main></body></html>