edlang/toml_edit/ser/struct.ValueSerializer.html

130 lines
71 KiB
HTML
Raw Normal View History

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Serialization for TOML values."><title>ValueSerializer in toml_edit::ser - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="toml_edit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc 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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../toml_edit/index.html">toml_edit</a><span class="version">0.22.17</span></h2></div><h2 class="location"><a href="#">ValueSerializer</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.new">new</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Default-for-ValueSerializer">Default</a></li><li><a href="#impl-Serializer-for-ValueSerializer">Serializer</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-ValueSerializer">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-ValueSerializer">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ValueSerializer">Send</a></li><li><a href="#impl-Sync-for-ValueSerializer">Sync</a></li><li><a href="#impl-Unpin-for-ValueSerializer">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ValueSerializer">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In toml_edit::ser</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">toml_edit</a>::<wbr><a href="index.html">ser</a>::<wbr><a class="struct" href="#">ValueSerializer</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</b
<p>This structure implements serialization support for TOML to serialize an
arbitrary type to TOML. Note that the TOML format does not support all
datatypes in Rust, such as enums, tuples, and tuple structs. These types
will generate an error when serialized.</p>
<p>Currently a serializer always writes its output to an in-memory <code>String</code>,
which is passed in when creating the serializer itself.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::Serialize;
<span class="attr">#[derive(Serialize)]
</span><span class="kw">struct </span>Config {
database: Database,
}
<span class="attr">#[derive(Serialize)]
</span><span class="kw">struct </span>Database {
ip: String,
port: Vec&lt;u16&gt;,
connection_max: u32,
enabled: bool,
}
<span class="kw">let </span>config = Config {
database: Database {
ip: <span class="string">"192.168.1.1"</span>.to_string(),
port: <span class="macro">vec!</span>[<span class="number">8001</span>, <span class="number">8002</span>, <span class="number">8003</span>],
connection_max: <span class="number">5000</span>,
enabled: <span class="bool-val">false</span>,
},
};
<span class="kw">let </span>value = serde::Serialize::serialize(
<span class="kw-2">&amp;</span>config,
toml_edit::ser::ValueSerializer::new()
).unwrap();
<span class="macro">println!</span>(<span class="string">"{}"</span>, value)</code></pre></div>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ValueSerializer" class="impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#54-59">source</a><a href="#impl-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#56-58">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section></summary><div class="docblock"><p>Creates a new serializer generate a TOML document.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-ValueSerializer" class="impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#50">source</a><a href="#impl-Default-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#50">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.80.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Serializer-for-ValueSerializer" class="impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#61-257">source</a><a href="#impl-Serializer-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../../serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Ok" class="associatedtype trait-impl"><a href="#associatedtype.Ok" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" class="associatedtype">Ok</a> = <a class="enum" href="../enum.Value.html" title="enum toml_edit::Value">Value</a></h4></section></summary><div class='docblock'>The output type produced by this <code>Serializer</code> during successful
serialization. Most serializers that produce text or binary output
should set <code>Ok = ()</code> and serialize into an <a href="https://doc.rust-lang.org/std/io/trait.Write.html"><code>io::Write</code></a> or buffer
contained within the <code>Serializer</code> instance. Serializers that build
in-memory data structures may be simplified by using <code>Ok</code> to propagate
the data structure around.</div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="enum.Error.html" title="enum toml_edit::ser::Error">Error</a></h4></section></summary><div class='docblock'>The error type when some error occurs during serialization.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeSeq" class="associatedtype trait-impl"><a href="#associatedtype.SerializeSeq" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a> = SerializeValueArray</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_seq"><code>serialize_seq</code></a> for serializing the content of the
sequence.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTuple" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTuple" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a> = SerializeValueArray</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_tuple"><code>serialize_tuple</code></a> for serializing the content of
the tuple.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTupleStruct" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleStruct" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a> = SerializeValueArray</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_tuple_struct"><code>serialize_tuple_struct</code></a> for serializing the
content of the tuple struct.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTupleVariant" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleVariant" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a> = SerializeVariant&lt;SerializeValueArray&gt;</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_tuple_variant"><code>serialize_tuple_variant</code></a> for serializing the
content of the tuple variant.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeMap" class="associatedtype trait-impl"><a href="#associatedtype.SerializeMap" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a> = SerializeMap</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_map"><code>serialize_map</code></a> for serializing the content of the
map.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeStruct" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStruct" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a> = SerializeMap</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_struct"><code>serialize_struct</code></a> for serializing the content of
the struct.</div></details><details class="toggle" open><summary><section id="associatedtype.SerializeStructVariant" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStructVariant" class="anchor">§</a><h4 class="code-header">type <a href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a> = SerializeVariant&lt;SerializeMap&gt;</h4></section></summary><div class='docblock'>Type returned from <a href="#tymethod.serialize_struct_variant"><code>serialize_struct_variant</code></a> for serializing the
content of the struct variant.</div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_bool" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#72-74">source</a><a href="#method.serialize_bool" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize a <code>bool</code> value. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_bool">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_i8" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#76-78">source</a><a href="#method.serialize_i8" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i8.html">i8</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize an <code>i8</code> value. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_i8">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_i16" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#80-82">source</a><a href="#method.serialize_i16" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i16.html">i16</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize an <code>i16</code> value. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_i16">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_i32" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#84-86">source</a><a href="#method.serialize_i32" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializ
T: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Serialize a <a href="https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some"><code>Some(T)</code></a> value. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_some">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_unit" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#154-156">source</a><a href="#method.serialize_unit" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize a <code>()</code> value. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_unit_struct" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#158-160">source</a><a href="#method.serialize_unit_struct" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(
self,
name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize a unit struct like <code>struct Unit</code> or <code>PhantomData&lt;T&gt;</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit_struct">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_unit_variant" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#162-169">source</a><a href="#method.serialize_unit_variant" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
_variant_index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize a unit variant like <code>E::A</code> in <code>enum E { A, B }</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_unit_variant">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_newtype_struct" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#171-180">source</a><a href="#method.serialize_newtype_struct" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a>&lt;T&gt;(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
value: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;T</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<div class="where">where
T: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Serialize a newtype struct like <code>struct Millimeters(u8)</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_struct">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_newtype_variant" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#182-196">source</a><a href="#method.serialize_newtype_variant" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a>&lt;T&gt;(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
_variant_index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
value: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;T</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<div class="where">where
T: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Serialize a newtype variant like <code>E::N</code> in <code>enum E { N(u8) }</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_variant">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_seq" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#198-204">source</a><a href="#method.serialize_seq" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_seq" class="fn">serialize_seq</a>(
self,
len: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeSeq" title="type serde::ser::Serializer::SerializeSeq">SerializeSeq</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a variably sized sequence. This call must be
followed by zero or more calls to <code>serialize_element</code>, then a call to
<code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_seq">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_tuple" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#206-208">source</a><a href="#method.serialize_tuple" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
self,
len: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTuple" title="type serde::ser::Serializer::SerializeTuple">SerializeTuple</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a statically sized sequence whose length will be
known at deserialization time without looking at the serialized data.
This call must be followed by zero or more calls to <code>serialize_element</code>,
then a call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_tuple_struct" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#210-216">source</a><a href="#method.serialize_tuple_struct" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
len: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type serde::ser::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a tuple struct like <code>struct Rgb(u8, u8, u8)</code>. This
call must be followed by zero or more calls to <code>serialize_field</code>, then a
call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_struct">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_tuple_variant" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#218-226">source</a><a href="#method.serialize_tuple_variant" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
_variant_index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
len: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type serde::ser::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a tuple variant like <code>E::T</code> in <code>enum E { T(u8, u8) }</code>. This call must be followed by zero or more calls to
<code>serialize_field</code>, then a call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_variant">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_map" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#228-234">source</a><a href="#method.serialize_map" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_map" class="fn">serialize_map</a>(
self,
len: <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeMap" title="type serde::ser::Serializer::SerializeMap">SerializeMap</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a map. This call must be followed by zero or more
calls to <code>serialize_key</code> and <code>serialize_value</code>, then a call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_struct" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#236-246">source</a><a href="#method.serialize_struct" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_struct" class="fn">serialize_struct</a>(
self,
name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
len: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeStruct" title="type serde::ser::Serializer::SerializeStruct">SerializeStruct</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a struct like <code>struct Rgb { r: u8, g: u8, b: u8 }</code>.
This call must be followed by zero or more calls to <code>serialize_field</code>,
then a call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_struct">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_struct_variant" class="method trait-impl"><a class="src rightside" href="../../src/toml_edit/ser/value.rs.html#248-256">source</a><a href="#method.serialize_struct_variant" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
self,
_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
_variant_index: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u32.html">u32</a>,
variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.str.html">str</a>,
len: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.usize.html">usize</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.SerializeStructVariant" title="type serde::ser::Serializer::SerializeStructVariant">SerializeStructVariant</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Begin to serialize a struct variant like <code>E::S</code> in <code>enum E { S { r: u8, g: u8, b: u8 } }</code>. This call must be followed by zero or more calls to
<code>serialize_field</code>, then a call to <code>end</code>. <a href="../../serde/ser/trait.Serializer.html#tymethod.serialize_struct_variant">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_i128" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#516">source</a><a href="#method.serialize_i128" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.serialize_i128" class="fn">serialize_i128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i128.html">i128</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize an <code>i128</code> value. <a href="../../serde/ser/trait.Serializer.html#method.serialize_i128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_u128" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#623">source</a><a href="#method.serialize_u128" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.serialize_u128" class="fn">serialize_u128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.u128.html">u128</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Serialize a <code>u128</code> value. <a href="../../serde/ser/trait.Serializer.html#method.serialize_u128">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.collect_seq" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#1281-1284">source</a><a href="#method.collect_seq" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.collect_seq" class="fn">collect_seq</a>&lt;I&gt;(self, iter: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<div class="where">where
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
&lt;I as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,</div></h4></section></summary><div class='docblock'>Collect an iterator as a sequence. <a href="../../serde/ser/trait.Serializer.html#method.collect_seq">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.collect_map" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#1318-1322">source</a><a href="#method.collect_map" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.collect_map" class="fn">collect_map</a>&lt;K, V, I&gt;(self, iter: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<div class="where">where
K: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,
V: <a class="trait" href="../../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,
I: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.tuple.html">(K, V)</a>&gt;,</div></h4></section></summary><div class='docblock'>Collect an iterator as a map. <a href="../../serde/ser/trait.Serializer.html#method.collect_map">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.collect_str" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#1359-1361">source</a><a href="#method.collect_str" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.collect_str" class="fn">collect_str</a>&lt;T&gt;(self, value: <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;T</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt;<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Serialize a string produced by an implementation of <code>Display</code>. <a href="../../serde/ser/trait.Serializer.html#method.collect_str">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.is_human_readable" class="method trait-impl"><a class="src rightside" href="../../src/serde/ser/mod.rs.html#1445">source</a><a href="#method.is_human_readable" class="anchor">§</a><h4 class="code-header">fn <a href="../../serde/ser/trait.Serializer.html#method.is_human_readable" class="fn">is_human_readable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Determine whether <code>Serialize</code> implementations should serialize in
human-readable form. <a href="../../serde/ser/trait.Serializer.html#method.is_human_readable">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-ValueSerializer" class="impl"><a href="#impl-Freeze-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section><section id="impl-RefUnwindSafe-for-ValueSerializer" class="impl"><a href="#impl-RefUnwindSafe-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section><section id="impl-Send-for-ValueSerializer" class="impl"><a href="#impl-Send-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section><section id="impl-Sync-for-ValueSerializer" class="impl"><a href="#impl-Sync-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section><section id="impl-Unpin-for-ValueSerializer" class="impl"><a href="#impl-Unpin-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section><section id="impl-UnwindSafe-for-ValueSerializer" class="impl"><a href="#impl-UnwindSafe-for-ValueSerializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ValueSerializer.html" title="struct toml_edit::ser::ValueSerializer">ValueSerializer</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.80.0/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/1.80.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.80.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; 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/1.80.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.80.0/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="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/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="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.80.0/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.80.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>