| <!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 dynamic structured value."><meta name="keywords" content="rust, rustlang, rust-lang, ValueBag"><title>ValueBag in value_bag - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc struct"><!--[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">☰</button><a class="sidebar-logo" href="../value_bag/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../value_bag/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">ValueBag</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.by_ref">by_ref</a></li><li><a href="#method.capture_debug">capture_debug</a></li><li><a href="#method.capture_display">capture_display</a></li><li><a href="#method.capture_error">capture_error</a></li><li><a href="#method.downcast_ref">downcast_ref</a></li><li><a href="#method.from_debug">from_debug</a></li><li><a href="#method.from_display">from_display</a></li><li><a href="#method.from_dyn_debug">from_dyn_debug</a></li><li><a href="#method.from_dyn_display">from_dyn_display</a></li><li><a href="#method.from_dyn_error">from_dyn_error</a></li><li><a href="#method.from_fill">from_fill</a></li><li><a href="#method.is">is</a></li><li><a href="#method.to_bool">to_bool</a></li><li><a href="#method.to_borrowed_error">to_borrowed_error</a></li><li><a href="#method.to_borrowed_str">to_borrowed_str</a></li><li><a href="#method.to_char">to_char</a></li><li><a href="#method.to_f64">to_f64</a></li><li><a href="#method.to_i128">to_i128</a></li><li><a href="#method.to_i64">to_i64</a></li><li><a href="#method.to_str">to_str</a></li><li><a href="#method.to_u128">to_u128</a></li><li><a href="#method.to_u64">to_u64</a></li><li><a href="#method.try_capture">try_capture</a></li><li><a href="#method.visit">visit</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Clone-for-ValueBag%3C%27v%3E">Clone</a></li><li><a href="#impl-Debug-for-ValueBag%3C%27v%3E">Debug</a></li><li><a href="#impl-Display-for-ValueBag%3C%27v%3E">Display</a></li><li><a href="#impl-From%3C%26%27a%20()%3E-for-ValueBag%3C%27v%3E">From<&'a ()></a></li><li><a href="#impl-From%3C%26%27a%20bool%3E-for-ValueBag%3C%27v%3E">From<&'a bool></a></li><li><a href="#impl-From%3C%26%27a%20char%3E-for-ValueBag%3C%27v%3E">From<&'a char></a></li><li><a href="#impl-From%3C%26%27a%20f32%3E-for-ValueBag%3C%27v%3E">From<&'a f32></a></li><li><a href="#impl-From%3C%26%27a%20f64%3E-for-ValueBag%3C%27v%3E">From<&'a f64></a></li><li><a href="#impl-From%3C%26%27a%20i16%3E-for-ValueBag%3C%27v%3E">From<&'a i16></a></li><li><a href="#impl-From%3C%26%27a%20i32%3E-for-ValueBag%3C%27v%3E">From<&'a i32></a></li><li><a href="#impl-From%3C%26%27a%20i64%3E-for-ValueBag%3C%27v%3E">From<&'a i64></a></li><li><a href="#impl-From%3C%26%27a%20i8%3E-for-ValueBag%3C%27v%3E">From<&'a i8></a></li><li><a href="#impl-From%3C%26%27a%20isize%3E-for-ValueBag%3C%27v%3E">From<&'a isize></a></li><li><a href="#impl-From%3C%26%27a%20u16%3E-for-ValueBag%3C%27v%3E">From<&'a u16></a></li><li><a href="#impl-From%3C%26%27a%20u32%3E-for-ValueBag%3C%27v%3E">From<&'a u32></a></li><li><a href="#impl-From%3C%26%27a%20u64%3E-for-ValueBag%3C%27v%3E">From<&'a u64></a></li><li><a href="#impl-From%3C%26%27a%20u8%3E-for-ValueBag%3C%27v%3E">From<&'a u8></a></li><li><a href="#impl-From%3C%26%27a%20usize%3E-for-ValueBag%3C%27v%3E">From<&'a usize></a></li><li><a href="#impl-From%3C%26%27v%20String%3E-for-ValueBag%3C%27v%3E">From<&'v String></a></li><li><a href="#impl-From%3C%26%27v%20i128%3E-for-ValueBag%3C%27v%3E">From<&'v i128></a></li><li><a href="#impl-From%3C%26%27v%20str%3E-for-ValueBag%3C%27v%3E">From<&'v str></a></li><li><a href="#impl-From%3C%26%27v%20u128%3E-for-ValueBag%3C%27v%3E">From<&'v u128></a></li><li><a href="#impl-From%3C()%3E-for-ValueBag%3C%27v%3E">From<()></a></li><li><a href="#impl-From%3Cbool%3E-for-ValueBag%3C%27v%3E">From<bool></a></li><li><a href="#impl-From%3Cchar%3E-for-ValueBag%3C%27v%3E">From<char></a></li><li><a href="#impl-From%3Cf32%3E-for-ValueBag%3C%27v%3E">From<f32></a></li><li><a href="#impl-From%3Cf64%3E-for-ValueBag%3C%27v%3E">From<f64></a></li><li><a href="#impl-From%3Ci16%3E-for-ValueBag%3C%27v%3E">From<i16></a></li><li><a href="#impl-From%3Ci32%3E-for-ValueBag%3C%27v%3E">From<i32></a></li><li><a href="#impl-From%3Ci64%3E-for-ValueBag%3C%27v%3E">From<i64></a></li><li><a href="#impl-From%3Ci8%3E-for-ValueBag%3C%27v%3E">From<i8></a></li><li><a href="#impl-From%3Cisize%3E-for-ValueBag%3C%27v%3E">From<isize></a></li><li><a href="#impl-From%3Cu16%3E-for-ValueBag%3C%27v%3E">From<u16></a></li><li><a href="#impl-From%3Cu32%3E-for-ValueBag%3C%27v%3E">From<u32></a></li><li><a href="#impl-From%3Cu64%3E-for-ValueBag%3C%27v%3E">From<u64></a></li><li><a href="#impl-From%3Cu8%3E-for-ValueBag%3C%27v%3E">From<u8></a></li><li><a href="#impl-From%3Cusize%3E-for-ValueBag%3C%27v%3E">From<usize></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-ValueBag%3C%27v%3E">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-ValueBag%3C%27v%3E">!Send</a></li><li><a href="#impl-Sync-for-ValueBag%3C%27v%3E">!Sync</a></li><li><a href="#impl-Unpin-for-ValueBag%3C%27v%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ValueBag%3C%27v%3E">!UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-ValueBag%3C%27v%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ValueBag%3C%27v%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ValueBag%3C%27v%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-ValueBag%3C%27v%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-ValueBag%3C%27v%3E">Into<U></a></li><li><a href="#impl-ToOwned-for-ValueBag%3C%27v%3E">ToOwned</a></li><li><a href="#impl-ToString-for-ValueBag%3C%27v%3E">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-ValueBag%3C%27v%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-ValueBag%3C%27v%3E">TryInto<U></a></li></ul></section><h2><a href="index.html">In value_bag</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">value_bag</a>::<wbr><a class="struct" href="#">ValueBag</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/value_bag/lib.rs.html#391-393">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct ValueBag<'v> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A dynamic structured value.</p> |
| <h2 id="capturing-values"><a href="#capturing-values">Capturing values</a></h2> |
| <p>There are a few ways to capture a value:</p> |
| <ul> |
| <li>Using the <code>ValueBag::capture_*</code> and <code>ValueBag::from_*</code> methods.</li> |
| <li>Using the standard <code>From</code> trait.</li> |
| <li>Using the <code>Fill</code> API.</li> |
| </ul> |
| <h3 id="using-the-valuebagcapture_-methods"><a href="#using-the-valuebagcapture_-methods">Using the <code>ValueBag::capture_*</code> methods</a></h3> |
| <p><code>ValueBag</code> offers a few constructor methods that capture values of different kinds. |
| These methods require a <code>T: 'static</code> to support downcasting.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::capture_debug(<span class="kw-2">&</span><span class="number">42i32</span>); |
| |
| <span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">42</span>), value.to_i64());</code></pre></div> |
| <p>Capturing a value using these methods will retain type information so that |
| the contents of the bag can be serialized using an appropriate type.</p> |
| <p>For cases where the <code>'static</code> bound can’t be satisfied, there’s also a few |
| constructors that exclude it.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::from_debug(<span class="kw-2">&</span><span class="number">42i32</span>); |
| |
| <span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, value.to_i64());</code></pre></div> |
| <p>These <code>ValueBag::from_*</code> methods are lossy though and <code>ValueBag::capture_*</code> should be preferred.</p> |
| <h3 id="using-the-standard-from-trait"><a href="#using-the-standard-from-trait">Using the standard <code>From</code> trait</a></h3> |
| <p>Primitive types can be converted into a <code>ValueBag</code> using the standard <code>From</code> trait.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::from(<span class="number">42i32</span>); |
| |
| <span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">42</span>), value.to_i64());</code></pre></div> |
| <h3 id="using-the-fill-api"><a href="#using-the-fill-api">Using the <code>Fill</code> API</a></h3> |
| <p>The <a href="fill/index.html" title="fill"><code>fill</code></a> module provides a way to bridge APIs that may not be directly |
| compatible with other constructor methods.</p> |
| <p>The <code>Fill</code> trait is automatically implemented for closures, so can usually |
| be used in libraries that can’t implement the trait themselves.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::{ValueBag, fill::Slot}; |
| |
| <span class="kw">let </span>value = ValueBag::from_fill(<span class="kw-2">&</span>|slot: Slot| { |
| <span class="attribute">#[derive(Debug)] |
| </span><span class="kw">struct </span>MyShortLivedValue; |
| |
| slot.fill_debug(<span class="kw-2">&</span>MyShortLivedValue) |
| }); |
| |
| <span class="macro">assert_eq!</span>(<span class="string">"MyShortLivedValue"</span>, <span class="macro">format!</span>(<span class="string">"{:?}"</span>, value));</code></pre></div> |
| <p>The trait can also be implemented manually:</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::{ValueBag, Error, fill::{Slot, Fill}}; |
| |
| <span class="kw">struct </span>FillDebug; |
| |
| <span class="kw">impl </span>Fill <span class="kw">for </span>FillDebug { |
| <span class="kw">fn </span>fill(<span class="kw-2">&</span><span class="self">self</span>, slot: Slot) -> <span class="prelude-ty">Result</span><(), Error> { |
| slot.fill_debug(<span class="kw-2">&</span><span class="number">42i32 </span><span class="kw">as </span><span class="kw-2">&</span><span class="kw">dyn </span>Debug) |
| } |
| } |
| |
| <span class="kw">let </span>value = ValueBag::from_fill(<span class="kw-2">&</span>FillDebug); |
| |
| <span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, value.to_i64());</code></pre></div> |
| <h2 id="inspecting-values"><a href="#inspecting-values">Inspecting values</a></h2> |
| <p>Once you have a <code>ValueBag</code> there are also a few ways to inspect it:</p> |
| <ul> |
| <li>Using <code>std::fmt</code></li> |
| <li>Using <code>sval</code></li> |
| <li>Using <code>serde</code></li> |
| <li>Using the <code>ValueBag::visit</code> method.</li> |
| <li>Using the <code>ValueBag::to_*</code> methods.</li> |
| <li>Using the <code>ValueBag::downcast_ref</code> method.</li> |
| </ul> |
| <h3 id="using-the-valuebagvisit-method"><a href="#using-the-valuebagvisit-method">Using the <code>ValueBag::visit</code> method</a></h3> |
| <p>The <a href="visit/index.html" title="visit"><code>visit</code></a> module provides a simple visitor API that can be used to inspect |
| the structure of primitives stored in a <code>ValueBag</code>. |
| More complex datatypes can then be handled using <code>std::fmt</code>, <code>sval</code>, or <code>serde</code>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attribute">#[cfg(not(feature = <span class="string">"std"</span>))] </span><span class="kw">fn </span>main() {} |
| <span class="attribute">#[cfg(feature = <span class="string">"std"</span>)] |
| </span><span class="kw">use </span>value_bag::{ValueBag, Error, visit::Visit}; |
| |
| <span class="comment">// Implement some simple custom serialization |
| </span><span class="kw">struct </span>MyVisit(Vec<u8>); |
| <span class="kw">impl</span><<span class="lifetime">'v</span>> Visit<<span class="lifetime">'v</span>> <span class="kw">for </span>MyVisit { |
| <span class="kw">fn </span>visit_any(<span class="kw-2">&mut </span><span class="self">self</span>, v: ValueBag) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="comment">// Fallback to `Debug` if we didn't visit the value specially |
| </span><span class="macro">write!</span>(<span class="kw-2">&mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"{:?}"</span>, v).map_err(|<span class="kw">_</span>| Error::msg(<span class="string">"failed to write value"</span>)) |
| } |
| |
| <span class="kw">fn </span>visit_u64(<span class="kw-2">&mut </span><span class="self">self</span>, v: u64) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="self">self</span>.<span class="number">0</span>.extend_from_slice(itoa_fmt(v).as_slice()); |
| <span class="prelude-val">Ok</span>(()) |
| } |
| |
| <span class="kw">fn </span>visit_i64(<span class="kw-2">&mut </span><span class="self">self</span>, v: i64) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="self">self</span>.<span class="number">0</span>.extend_from_slice(itoa_fmt(v).as_slice()); |
| <span class="prelude-val">Ok</span>(()) |
| } |
| |
| <span class="kw">fn </span>visit_f64(<span class="kw-2">&mut </span><span class="self">self</span>, v: f64) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="self">self</span>.<span class="number">0</span>.extend_from_slice(ryu_fmt(v).as_slice()); |
| <span class="prelude-val">Ok</span>(()) |
| } |
| |
| <span class="kw">fn </span>visit_str(<span class="kw-2">&mut </span><span class="self">self</span>, v: <span class="kw-2">&</span>str) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="self">self</span>.<span class="number">0</span>.push(<span class="string">b'\"'</span>); |
| <span class="self">self</span>.<span class="number">0</span>.extend_from_slice(escape(v.as_bytes())); |
| <span class="self">self</span>.<span class="number">0</span>.push(<span class="string">b'\"'</span>); |
| <span class="prelude-val">Ok</span>(()) |
| } |
| |
| <span class="kw">fn </span>visit_bool(<span class="kw-2">&mut </span><span class="self">self</span>, v: bool) -> <span class="prelude-ty">Result</span><(), Error> { |
| <span class="self">self</span>.<span class="number">0</span>.extend_from_slice(<span class="kw">if </span>v { <span class="string">b"true" </span>} <span class="kw">else </span>{ <span class="string">b"false" </span>}); |
| <span class="prelude-val">Ok</span>(()) |
| } |
| } |
| |
| <span class="kw">let </span>value = ValueBag::from(<span class="number">42i64</span>); |
| |
| <span class="kw">let </span><span class="kw-2">mut </span>visitor = MyVisit(<span class="macro">vec!</span>[]); |
| value.visit(<span class="kw-2">&mut </span>visitor)<span class="question-mark">?</span>;</code></pre></div> |
| <h3 id="using-stdfmt"><a href="#using-stdfmt">Using <code>std::fmt</code></a></h3> |
| <p>Any <code>ValueBag</code> can be formatted using the <code>std::fmt</code> machinery as either <code>Debug</code> |
| or <code>Display</code>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::from(<span class="bool-val">true</span>); |
| |
| <span class="macro">assert_eq!</span>(<span class="string">"true"</span>, <span class="macro">format!</span>(<span class="string">"{:?}"</span>, value));</code></pre></div> |
| <h3 id="using-sval"><a href="#using-sval">Using <code>sval</code></a></h3> |
| <p>When the <code>sval2</code> feature is enabled, any <code>ValueBag</code> can be serialized using <code>sval</code>. |
| This makes it possible to visit any typed structure captured in the <code>ValueBag</code>, |
| including complex datatypes like maps and sequences.</p> |
| <p><code>sval</code> doesn’t need to allocate so can be used in no-std environments.</p> |
| <p>First, enable the <code>sval2</code> feature in your <code>Cargo.toml</code>:</p> |
| <div class="example-wrap"><pre class="language-toml"><code>[dependencies.value-bag] |
| features = ["sval2"]</code></pre></div> |
| <p>Then stream the contents of the <code>ValueBag</code> using <code>sval</code>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::from(<span class="number">42i64</span>); |
| <span class="kw">let </span>json = sval_json::stream_to_string(value)<span class="question-mark">?</span>;</code></pre></div> |
| <h3 id="using-serde"><a href="#using-serde">Using <code>serde</code></a></h3> |
| <p>When the <code>serde1</code> feature is enabled, any <code>ValueBag</code> can be serialized using <code>serde</code>. |
| This makes it possible to visit any typed structure captured in the <code>ValueBag</code>, |
| including complex datatypes like maps and sequences.</p> |
| <p><code>serde</code> needs a few temporary allocations, so also brings in the <code>std</code> feature.</p> |
| <p>First, enable the <code>serde1</code> feature in your <code>Cargo.toml</code>:</p> |
| <div class="example-wrap"><pre class="language-toml"><code>[dependencies.value-bag] |
| features = ["serde1"]</code></pre></div> |
| <p>Then stream the contents of the <code>ValueBag</code> using <code>serde</code>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::from(<span class="number">42i64</span>); |
| <span class="kw">let </span>json = serde_json::to_string(<span class="kw-2">&</span>value)<span class="question-mark">?</span>;</code></pre></div> |
| <p>Also see <a href="https://serde.rs"><code>serde.rs</code></a> for more examples of writing your own serializers.</p> |
| <h3 id="using-the-valuebagto_-methods"><a href="#using-the-valuebagto_-methods">Using the <code>ValueBag::to_*</code> methods</a></h3> |
| <p><code>ValueBag</code> provides a set of methods for attempting to pull a concrete value out. |
| These are useful for ad-hoc analysis but aren’t intended for exhaustively serializing |
| the contents of a <code>ValueBag</code>.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>value = ValueBag::capture_display(<span class="kw-2">&</span><span class="number">42u64</span>); |
| |
| <span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="number">42u64</span>), value.to_u64());</code></pre></div> |
| <h3 id="using-the-valuebagdowncast_ref-method"><a href="#using-the-valuebagdowncast_ref-method">Using the <code>ValueBag::downcast_ref</code> method</a></h3> |
| <p>When a <code>ValueBag</code> is created using one of the <code>capture_*</code> constructors, it can be downcast |
| back to its original value. |
| This can also be useful for ad-hoc analysis where there’s a common possible non-primitive |
| type that could be captured.</p> |
| |
| <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>value_bag::ValueBag; |
| |
| <span class="kw">let </span>timestamp = now(); |
| <span class="kw">let </span>value = ValueBag::capture_debug(<span class="kw-2">&</span>timestamp); |
| |
| <span class="macro">assert!</span>(value.downcast_ref::<SystemTime>().is_some());</code></pre></div> |
| </div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#365-375">source</a><a href="#impl-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_str" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#372-374">source</a><h4 class="code-header">pub fn <a href="#method.to_str" class="fnname">to_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'v, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>></h4></section></summary><div class="docblock"><p>Try get a <code>str</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones. If the serialization |
| implementation produces a short lived string it will be allocated.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#20-116">source</a><a href="#impl-ValueBag%3C%27v%3E-1" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_capture" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#26-31">source</a><h4 class="code-header">pub fn <a href="#method.try_capture" class="fnname">try_capture</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self><span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static,</span></h4></section></summary><div class="docblock"><p>Try capture a raw value.</p> |
| <p>This method will return <code>Some</code> if the value is a simple primitive |
| that can be captured without losing its structure. In other cases |
| this method will return <code>None</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_u64" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#37-39">source</a><h4 class="code-header">pub fn <a href="#method.to_u64" class="fnname">to_u64</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>></h4></section></summary><div class="docblock"><p>Try get a <code>u64</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_i64" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#45-47">source</a><h4 class="code-header">pub fn <a href="#method.to_i64" class="fnname">to_i64</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>></h4></section></summary><div class="docblock"><p>Try get a <code>i64</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_u128" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#53-55">source</a><h4 class="code-header">pub fn <a href="#method.to_u128" class="fnname">to_u128</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>></h4></section></summary><div class="docblock"><p>Try get a <code>u128</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_i128" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#61-63">source</a><h4 class="code-header">pub fn <a href="#method.to_i128" class="fnname">to_i128</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>></h4></section></summary><div class="docblock"><p>Try get a <code>i128</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_f64" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#69-71">source</a><h4 class="code-header">pub fn <a href="#method.to_f64" class="fnname">to_f64</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>></h4></section></summary><div class="docblock"><p>Try get a <code>f64</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_bool" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#77-79">source</a><h4 class="code-header">pub fn <a href="#method.to_bool" class="fnname">to_bool</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>></h4></section></summary><div class="docblock"><p>Try get a <code>bool</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_char" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#85-87">source</a><h4 class="code-header">pub fn <a href="#method.to_char" class="fnname">to_char</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>></h4></section></summary><div class="docblock"><p>Try get a <code>char</code> from this value.</p> |
| <p>This method is cheap for primitive types, but may call arbitrary |
| serialization implementations for complex ones.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_borrowed_str" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#93-95">source</a><h4 class="code-header">pub fn <a href="#method.to_borrowed_str" class="fnname">to_borrowed_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Try get a <code>str</code> from this value.</p> |
| <p>This method is cheap for primitive types. It won’t allocate an owned |
| <code>String</code> if the value is a complex type.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#98-100">source</a><h4 class="code-header">pub fn <a href="#method.is" class="fnname">is</a><T: 'static>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Check whether this value can be downcast to <code>T</code>.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.downcast_ref" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/cast/mod.rs.html#103-115">source</a><h4 class="code-header">pub fn <a href="#method.downcast_ref" class="fnname">downcast_ref</a><T: 'static>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T></h4></section></summary><div class="docblock"><p>Try downcast this value to <code>T</code>.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-2" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/error.rs.html#9-37">source</a><a href="#impl-ValueBag%3C%27v%3E-2" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.capture_error" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/error.rs.html#11-18">source</a><h4 class="code-header">pub fn <a href="#method.capture_error" class="fnname">capture_error</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static,</span></h4></section></summary><div class="docblock"><p>Get a value from an error.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_dyn_error" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/error.rs.html#22-26">source</a><h4 class="code-header">pub fn <a href="#method.from_dyn_error" class="fnname">from_dyn_error</a>(value: &'v (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)) -> Self</h4></section></summary><div class="docblock"><p>Get a value from an erased value.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_borrowed_error" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/error.rs.html#30-36">source</a><h4 class="code-header">pub fn <a href="#method.to_borrowed_error" class="fnname">to_borrowed_error</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'v (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a> + 'static)></h4></section></summary><div class="docblock"><p>Try get an error from this value.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-3" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fill.rs.html#4-14">source</a><a href="#impl-ValueBag%3C%27v%3E-3" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_fill" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fill.rs.html#6-13">source</a><h4 class="code-header">pub fn <a href="#method.from_fill" class="fnname">from_fill</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="fill/trait.Fill.html" title="trait value_bag::fill::Fill">Fill</a>,</span></h4></section></summary><div class="docblock"><p>Get a value from a fillable slot.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-4" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#14-76">source</a><a href="#impl-ValueBag%3C%27v%3E-4" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.capture_debug" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#19-26">source</a><h4 class="code-header">pub fn <a href="#method.capture_debug" class="fnname">capture_debug</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + 'static,</span></h4></section></summary><div class="docblock"><p>Get a value from a debuggable type.</p> |
| <p>This method will attempt to capture the given value as a well-known primitive |
| before resorting to using its <code>Debug</code> implementation.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.capture_display" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#32-39">source</a><h4 class="code-header">pub fn <a href="#method.capture_display" class="fnname">capture_display</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + 'static,</span></h4></section></summary><div class="docblock"><p>Get a value from a displayable type.</p> |
| <p>This method will attempt to capture the given value as a well-known primitive |
| before resorting to using its <code>Display</code> implementation.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_debug" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#42-49">source</a><h4 class="code-header">pub fn <a href="#method.from_debug" class="fnname">from_debug</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</span></h4></section></summary><div class="docblock"><p>Get a value from a debuggable type without capturing support.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_display" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#52-59">source</a><h4 class="code-header">pub fn <a href="#method.from_display" class="fnname">from_display</a><T>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'v </a>T) -> Self<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>,</span></h4></section></summary><div class="docblock"><p>Get a value from a displayable type without capturing support.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_dyn_debug" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#63-67">source</a><h4 class="code-header">pub fn <a href="#method.from_dyn_debug" class="fnname">from_dyn_debug</a>(value: &'v dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>) -> Self</h4></section></summary><div class="docblock"><p>Get a value from a debuggable type without capturing support.</p> |
| </div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_dyn_display" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#71-75">source</a><h4 class="code-header">pub fn <a href="#method.from_dyn_display" class="fnname">from_dyn_display</a>(value: &'v dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a>) -> Self</h4></section></summary><div class="docblock"><p>Get a value from a displayable type without capturing support.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-5" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/visit.rs.html#219-314">source</a><a href="#impl-ValueBag%3C%27v%3E-5" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.visit" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/visit.rs.html#225-313">source</a><h4 class="code-header">pub fn <a href="#method.visit" class="fnname">visit</a>(&self, visitor: impl <a class="trait" href="visit/trait.Visit.html" title="trait value_bag::visit::Visit">Visit</a><'v>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct value_bag::Error">Error</a>></h4></section></summary><div class="docblock"><p>Visit this value using a simple visitor.</p> |
| <p>The visitor isn’t strictly required to inspect the contents of a value bag. |
| It’s useful for simple cases where a full framework like <code>serde</code> or <code>sval</code> |
| isn’t necessary.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ValueBag%3C%27v%3E-6" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/lib.rs.html#395-403">source</a><a href="#impl-ValueBag%3C%27v%3E-6" class="anchor"></a><h3 class="code-header">impl<'v> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.by_ref" class="method has-srclink"><a class="srclink rightside" href="../src/value_bag/lib.rs.html#398-402">source</a><h4 class="code-header">pub fn <a href="#method.by_ref" class="fnname">by_ref</a><'u>(&'u self) -> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'u></h4></section></summary><div class="docblock"><p>Get a <code>ValueBag</code> from a reference to a <code>ValueBag</code>.</p> |
| </div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/lib.rs.html#390">source</a><a href="#impl-Clone-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/lib.rs.html#390">source</a><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#132-227">source</a><a href="#impl-Debug-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#133-226">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#229-324">source</a><a href="#impl-Display-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/internal/fmt.rs.html#230-323">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20()%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20()%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20bool%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20bool%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-29" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20char%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20char%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-27" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20f32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20f32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-23" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20f64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20f64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-25" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20i16%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20i16%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-17" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20i32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20i32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-19" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20i64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20i64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-21" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20i8%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20i8%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-15" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20isize%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20isize%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-13" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20u16%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20u16%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-7" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20u32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20u32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-9" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20u64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20u64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-11" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20u8%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20u8%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-5" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20usize%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C%26%27a%20usize%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'a, 'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-3" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'a <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27v%20String%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#86-91">source</a><a href="#impl-From%3C%26%27v%20String%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'v <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-33" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#88-90">source</a><a href="#method.from-33" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(v: &'v <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27v%20i128%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#57-62">source</a><a href="#impl-From%3C%26%27v%20i128%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#59-61">source</a><a href="#method.from-32" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27v%20str%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#43-48">source</a><a href="#impl-From%3C%26%27v%20str%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#45-47">source</a><a href="#method.from-30" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27v%20u128%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#50-55">source</a><a href="#impl-From%3C%26%27v%20u128%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#52-54">source</a><a href="#method.from-31" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: &'v <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C()%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3C()%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cbool%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cbool%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-28" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cchar%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cchar%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-26" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cf32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cf32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-22" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cf64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cf64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-24" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Ci16%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Ci16%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-16" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Ci32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Ci32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-18" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Ci64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Ci64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-20" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Ci8%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Ci8%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-14" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cisize%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cisize%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-12" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cu16%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cu16%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-6" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cu32%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cu32%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-8" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cu64%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cu64%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-10" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cu8%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cu8%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-4" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3Cusize%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#impl-From%3Cusize%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/value_bag/impls.rs.html#25-41">source</a><a href="#method.from-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section><section id="impl-Send-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a href="#impl-Send-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section><section id="impl-Sync-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a href="#impl-Sync-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section><section id="impl-Unpin-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a href="#impl-Unpin-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section><section id="impl-UnwindSafe-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<'v> !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ValueBag.html" title="struct value_bag::ValueBag">ValueBag</a><'v></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-34" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-34" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p> |
| <p>That is, this conversion is whatever the implementation of |
| <code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p> |
| </div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToOwned-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83">source</a><a href="#impl-ToOwned-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Owned" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2497">source</a><a href="#impl-ToString-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2503">source</a><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-ValueBag%3C%27v%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-ValueBag%3C%27v%3E" class="anchor"></a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="value_bag" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html> |