mentat/serde_cbor/struct.Serializer.html
2018-08-22 17:04:13 +00:00

259 lines
No EOL
58 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `Serializer` struct in crate `serde_cbor`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Serializer">
<title>serde_cbor::Serializer - Rust</title>
<link rel="stylesheet" type="text/css" href="../normalize.css">
<link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../dark.css">
<link rel="stylesheet" type="text/css" href="../main.css" id="themeStyle">
<script src="../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Struct Serializer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.packed">packed</a><a href="#method.self_describe">self_describe</a><a href="#method.into_inner">into_inner</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Serializer">Serializer</a><a href="#impl-SerializeTuple">SerializeTuple</a><a href="#impl-SerializeTupleStruct">SerializeTupleStruct</a><a href="#impl-SerializeTupleVariant">SerializeTupleVariant</a></div></div><p class='location'><a href='index.html'>serde_cbor</a></p><script>window.sidebarCurrent = {name: 'Serializer', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>serde_cbor</a>::<wbr><a class="struct" href=''>Serializer</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../src/serde_cbor/ser.rs.html#100-103' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Serializer&lt;W&gt; { /* fields omitted */ }</pre><div class='docblock'><p>A structure for serializing Rust values to CBOR.</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;W&gt; <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#105-212' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>(writer: W) -&gt; <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#111-116' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new CBOR serializer.</p>
</div><h4 id='method.packed' class="method"><span id='packed.v' class='invisible'><code>pub fn <a href='#method.packed' class='fnname'>packed</a>(writer: W) -&gt; <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#123-128' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new &quot;packed&quot; CBOR serializer.</p>
<p>Struct fields and enum variants are identified by their numeric indices rather than names
to save space.</p>
</div><h4 id='method.self_describe' class="method"><span id='self_describe.v' class='invisible'><code>pub fn <a href='#method.self_describe' class='fnname'>self_describe</a>(&amp;mut self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#135-139' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Writes a CBOR self-describe tag to the stream.</p>
<p>Tagging allows a decoder to distinguish different file formats based on their content
without further information.</p>
</div><h4 id='method.into_inner' class="method"><span id='into_inner.v' class='invisible'><code>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -&gt; W</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#143-145' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Unwrap the <code>Writer</code> from the <code>Serializer</code>.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Serializer' class='impl'><span class='in-band'><code>impl&lt;'a, W&gt; <a class="trait" href="../serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a> for &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-Serializer' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#214-461' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Ok' class="type"><span id='Ok.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.Ok' class="type">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
<div class='docblock'><p>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 [<code>io::Write</code>] 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. <a href="../serde/ser/trait.Serializer.html#associatedtype.Ok">Read more</a></p>
</div><h4 id='associatedtype.Error' class="type"><span id='Error.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../serde_cbor/error/struct.Error.html" title="struct serde_cbor::error::Error">Error</a></code></span></h4>
<div class='docblock'><p>The error type when some error occurs during serialization.</p>
</div><h4 id='associatedtype.SerializeSeq' class="type"><span id='SerializeSeq.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeSeq' class="type">SerializeSeq</a> = CollectionSerializer&lt;'a, W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_seq</code>] for serializing the content of the sequence. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeSeq">Read more</a></p>
</div><h4 id='associatedtype.SerializeTuple' class="type"><span id='SerializeTuple.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeTuple' class="type">SerializeTuple</a> = &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_tuple</code>] for serializing the content of the tuple. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTuple">Read more</a></p>
</div><h4 id='associatedtype.SerializeTupleStruct' class="type"><span id='SerializeTupleStruct.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleStruct' class="type">SerializeTupleStruct</a> = &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_tuple_struct</code>] for serializing the content of the tuple struct. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleStruct">Read more</a></p>
</div><h4 id='associatedtype.SerializeTupleVariant' class="type"><span id='SerializeTupleVariant.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleVariant' class="type">SerializeTupleVariant</a> = &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_tuple_variant</code>] for serializing the content of the tuple variant. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleVariant">Read more</a></p>
</div><h4 id='associatedtype.SerializeMap' class="type"><span id='SerializeMap.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeMap' class="type">SerializeMap</a> = CollectionSerializer&lt;'a, W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_map</code>] for serializing the content of the map. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeMap">Read more</a></p>
</div><h4 id='associatedtype.SerializeStruct' class="type"><span id='SerializeStruct.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeStruct' class="type">SerializeStruct</a> = StructSerializer&lt;'a, W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_struct</code>] for serializing the content of the struct. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeStruct">Read more</a></p>
</div><h4 id='associatedtype.SerializeStructVariant' class="type"><span id='SerializeStructVariant.t' class='invisible'><code>type <a href='../serde/ser/trait.Serializer.html#associatedtype.SerializeStructVariant' class="type">SerializeStructVariant</a> = StructSerializer&lt;'a, W&gt;</code></span></h4>
<div class='docblock'><p>Type returned from [<code>serialize_struct_variant</code>] for serializing the content of the struct variant. <a href="../serde/ser/trait.Serializer.html#associatedtype.SerializeStructVariant">Read more</a></p>
</div><h4 id='method.serialize_bool' class="method"><span id='serialize_bool.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_bool' class='fnname'>serialize_bool</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#230-233' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>bool</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_bool">Read more</a></p>
</div><h4 id='method.serialize_i8' class="method"><span id='serialize_i8.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_i8' class='fnname'>serialize_i8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#236-242' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>i8</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_i8">Read more</a></p>
</div><h4 id='method.serialize_i16' class="method"><span id='serialize_i16.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_i16' class='fnname'>serialize_i16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#245-251' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>i16</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_i16">Read more</a></p>
</div><h4 id='method.serialize_i32' class="method"><span id='serialize_i32.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_i32' class='fnname'>serialize_i32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#254-260' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>i32</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_i32">Read more</a></p>
</div><h4 id='method.serialize_i64' class="method"><span id='serialize_i64.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_i64' class='fnname'>serialize_i64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#263-269' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>i64</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_i64">Read more</a></p>
</div><h4 id='method.serialize_u8' class="method"><span id='serialize_u8.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_u8' class='fnname'>serialize_u8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#272-274' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>u8</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_u8">Read more</a></p>
</div><h4 id='method.serialize_u16' class="method"><span id='serialize_u16.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_u16' class='fnname'>serialize_u16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#277-279' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>u16</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_u16">Read more</a></p>
</div><h4 id='method.serialize_u32' class="method"><span id='serialize_u32.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_u32' class='fnname'>serialize_u32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#282-284' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>u32</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_u32">Read more</a></p>
</div><h4 id='method.serialize_u64' class="method"><span id='serialize_u64.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_u64' class='fnname'>serialize_u64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#287-289' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>u64</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_u64">Read more</a></p>
</div><h4 id='method.serialize_f32' class="method"><span id='serialize_f32.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_f32' class='fnname'>serialize_f32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#292-307' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>f32</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_f32">Read more</a></p>
</div><h4 id='method.serialize_f64' class="method"><span id='serialize_f64.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_f64' class='fnname'>serialize_f64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#310-318' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize an <code>f64</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_f64">Read more</a></p>
</div><h4 id='method.serialize_char' class="method"><span id='serialize_char.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_char' class='fnname'>serialize_char</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#321-325' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a character. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_char">Read more</a></p>
</div><h4 id='method.serialize_str' class="method"><span id='serialize_str.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_str' class='fnname'>serialize_str</a>(self, value: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#328-331' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>&amp;str</code>. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_str">Read more</a></p>
</div><h4 id='method.serialize_bytes' class="method"><span id='serialize_bytes.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_bytes' class='fnname'>serialize_bytes</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#334-337' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a chunk of raw byte data. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_bytes">Read more</a></p>
</div><h4 id='method.serialize_unit' class="method"><span id='serialize_unit.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_unit' class='fnname'>serialize_unit</a>(self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#340-342' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a <code>()</code> value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_unit">Read more</a></p>
</div><h4 id='method.serialize_some' class="method"><span id='serialize_some.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_some' class='fnname'>serialize_some</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#345-350' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a [<code>Some(T)</code>] value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_some">Read more</a></p>
</div><h4 id='method.serialize_none' class="method"><span id='serialize_none.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_none' class='fnname'>serialize_none</a>(self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#353-355' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a [<code>None</code>] value. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_none">Read more</a></p>
</div><h4 id='method.serialize_unit_struct' class="method"><span id='serialize_unit_struct.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_unit_struct' class='fnname'>serialize_unit_struct</a>(self, _name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#358-360' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_unit_variant' class="method"><span id='serialize_unit_variant.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_unit_variant' class='fnname'>serialize_unit_variant</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#363-374' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_newtype_struct' class="method"><span id='serialize_newtype_struct.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_struct' class='fnname'>serialize_newtype_struct</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T<br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#377-382' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a newtype struct like <code>struct Millimeters(u8)</code>. <a href="../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_struct">Read more</a></p>
</div><h4 id='method.serialize_newtype_variant' class="method"><span id='serialize_newtype_variant.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_newtype_variant' class='fnname'>serialize_newtype_variant</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T<br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#385-398' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_seq' class="method"><span id='serialize_seq.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_seq' class='fnname'>serialize_seq</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;CollectionSerializer&lt;'a, W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#401-403' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_tuple' class="method"><span id='serialize_tuple.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_tuple' class='fnname'>serialize_tuple</a>(self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;&amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#406-409' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_tuple_struct' class="method"><span id='serialize_tuple_struct.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_struct' class='fnname'>serialize_tuple_struct</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;&amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#412-418' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_tuple_variant' class="method"><span id='serialize_tuple_variant.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_tuple_variant' class='fnname'>serialize_tuple_variant</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;&amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#421-431' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_map' class="method"><span id='serialize_map.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_map' class='fnname'>serialize_map</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;<br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;CollectionSerializer&lt;'a, W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#434-436' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_struct' class="method"><span id='serialize_struct.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_struct' class='fnname'>serialize_struct</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;StructSerializer&lt;'a, W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#439-442' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.serialize_struct_variant' class="method"><span id='serialize_struct_variant.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#tymethod.serialize_struct_variant' class='fnname'>serialize_struct_variant</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;variant: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;StructSerializer&lt;'a, W&gt;&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#445-455' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.is_human_readable' class="method"><span id='is_human_readable.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#method.is_human_readable' class='fnname'>is_human_readable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#458-460' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>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></p>
</div><h4 id='method.collect_seq' class="method"><span id='collect_seq.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#method.collect_seq' class='fnname'>collect_seq</a>&lt;I&gt;(self, iter: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde/ser/mod.rs.html#1363-1374' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Collect an iterator as a sequence. <a href="../serde/ser/trait.Serializer.html#method.collect_seq">Read more</a></p>
</div><h4 id='method.collect_map' class="method"><span id='collect_map.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#method.collect_map' class='fnname'>collect_map</a>&lt;K, V, I&gt;(self, iter: I) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>K, V<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde/ser/mod.rs.html#1402-1414' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Collect an iterator as a map. <a href="../serde/ser/trait.Serializer.html#method.collect_map">Read more</a></p>
</div><h4 id='method.collect_str' class="method"><span id='collect_str.v' class='invisible'><code>fn <a href='../serde/ser/trait.Serializer.html#method.collect_str' class='fnname'>collect_str</a>&lt;T&gt;(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;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>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde/ser/mod.rs.html#1447-1455' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a string produced by an implementation of <code>Display</code>. <a href="../serde/ser/trait.Serializer.html#method.collect_str">Read more</a></p>
</div></div><h3 id='impl-SerializeTuple' class='impl'><span class='in-band'><code>impl&lt;'a, W&gt; <a class="trait" href="../serde/ser/trait.SerializeTuple.html" title="trait serde::ser::SerializeTuple">SerializeTuple</a> for &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-SerializeTuple' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#463-482' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Ok-1' class="type"><span id='Ok.t-1' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTuple.html#associatedtype.Ok' class="type">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Ok</code> type of our <code>Serializer</code>.</p>
</div><h4 id='associatedtype.Error-1' class="type"><span id='Error.t-1' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTuple.html#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../serde_cbor/error/struct.Error.html" title="struct serde_cbor::error::Error">Error</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Error</code> type of our <code>Serializer</code>.</p>
</div><h4 id='method.serialize_element' class="method"><span id='serialize_element.v' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTuple.html#tymethod.serialize_element' class='fnname'>serialize_element</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#471-476' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a tuple element.</p>
</div><h4 id='method.end' class="method"><span id='end.v' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTuple.html#tymethod.end' class='fnname'>end</a>(self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#479-481' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Finish serializing a tuple.</p>
</div></div><h3 id='impl-SerializeTupleStruct' class='impl'><span class='in-band'><code>impl&lt;'a, W&gt; <a class="trait" href="../serde/ser/trait.SerializeTupleStruct.html" title="trait serde::ser::SerializeTupleStruct">SerializeTupleStruct</a> for &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-SerializeTupleStruct' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#484-503' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Ok-2' class="type"><span id='Ok.t-2' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTupleStruct.html#associatedtype.Ok' class="type">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Ok</code> type of our <code>Serializer</code>.</p>
</div><h4 id='associatedtype.Error-2' class="type"><span id='Error.t-2' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTupleStruct.html#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../serde_cbor/error/struct.Error.html" title="struct serde_cbor::error::Error">Error</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Error</code> type of our <code>Serializer</code>.</p>
</div><h4 id='method.serialize_field' class="method"><span id='serialize_field.v' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTupleStruct.html#tymethod.serialize_field' class='fnname'>serialize_field</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#492-497' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a tuple struct field.</p>
</div><h4 id='method.end-1' class="method"><span id='end.v-1' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTupleStruct.html#tymethod.end' class='fnname'>end</a>(self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#500-502' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Finish serializing a tuple struct.</p>
</div></div><h3 id='impl-SerializeTupleVariant' class='impl'><span class='in-band'><code>impl&lt;'a, W&gt; <a class="trait" href="../serde/ser/trait.SerializeTupleVariant.html" title="trait serde::ser::SerializeTupleVariant">SerializeTupleVariant</a> for &amp;'a mut <a class="struct" href="../serde_cbor/ser/struct.Serializer.html" title="struct serde_cbor::ser::Serializer">Serializer</a>&lt;W&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,&nbsp;</span></code><a href='#impl-SerializeTupleVariant' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#505-524' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Ok-3' class="type"><span id='Ok.t-3' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTupleVariant.html#associatedtype.Ok' class="type">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Ok</code> type of our <code>Serializer</code>.</p>
</div><h4 id='associatedtype.Error-3' class="type"><span id='Error.t-3' class='invisible'><code>type <a href='../serde/ser/trait.SerializeTupleVariant.html#associatedtype.Error' class="type">Error</a> = <a class="struct" href="../serde_cbor/error/struct.Error.html" title="struct serde_cbor::error::Error">Error</a></code></span></h4>
<div class='docblock'><p>Must match the <code>Error</code> type of our <code>Serializer</code>.</p>
</div><h4 id='method.serialize_field-1' class="method"><span id='serialize_field.v-1' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTupleVariant.html#tymethod.serialize_field' class='fnname'>serialize_field</a>&lt;T:&nbsp;?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(&amp;mut self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#513-518' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize a tuple variant field.</p>
</div><h4 id='method.end-2' class="method"><span id='end.v-2' class='invisible'><code>fn <a href='../serde/ser/trait.SerializeTupleVariant.html#tymethod.end' class='fnname'>end</a>(self) -&gt; <a class="type" href="../serde_cbor/error/type.Result.html" title="type serde_cbor::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_cbor/ser.rs.html#521-523' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Finish serializing a tuple variant.</p>
</div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../";
window.currentCrate = "serde_cbor";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>