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

231 lines
No EOL
49 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_json`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Serializer">
<title>serde_json::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.pretty">pretty</a><a href="#method.with_formatter">with_formatter</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></div></div><p class='location'><a href='index.html'>serde_json</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_json</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_json/ser.rs.html#29-32' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Serializer&lt;W, F&nbsp;=&nbsp;<a class="struct" href="../serde_json/ser/struct.CompactFormatter.html" title="struct serde_json::ser::CompactFormatter">CompactFormatter</a>&gt; { /* fields omitted */ }</pre><div class='docblock'><p>A structure for serializing Rust values into JSON.</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_json/ser/struct.Serializer.html" title="struct serde_json::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_json/ser.rs.html#34-43' 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; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#40-42' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new JSON serializer.</p>
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><code>impl&lt;'a, W&gt; <a class="struct" href="../serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a>&lt;W, <a class="struct" href="../serde_json/ser/struct.PrettyFormatter.html" title="struct serde_json::ser::PrettyFormatter">PrettyFormatter</a>&lt;'a&gt;&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-1' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#45-54' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.pretty' class="method"><span id='pretty.v' class='invisible'><code>pub fn <a href='#method.pretty' class='fnname'>pretty</a>(writer: W) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#51-53' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new JSON pretty print serializer.</p>
</div></div><h3 id='impl-2' class='impl'><span class='in-band'><code>impl&lt;W, F&gt; <a class="struct" href="../serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a>&lt;W, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../serde_json/ser/trait.Formatter.html" title="trait serde_json::ser::Formatter">Formatter</a>,&nbsp;</span></code><a href='#impl-2' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#56-76' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.with_formatter' class="method"><span id='with_formatter.v' class='invisible'><code>pub fn <a href='#method.with_formatter' class='fnname'>with_formatter</a>(writer: W, formatter: F) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#64-69' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a new JSON visitor whose output will be written to the writer
specified.</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_json/ser.rs.html#73-75' 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, F&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_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a>&lt;W, F&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>,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../serde_json/ser/trait.Formatter.html" title="trait serde_json::ser::Formatter">Formatter</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_json/ser.rs.html#78-566' 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_json/error/struct.Error.html" title="struct serde_json::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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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> = Compound&lt;'a, W, F&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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#95-102' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#105-112' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#115-122' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#125-132' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#135-142' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#153-160' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#163-170' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#173-180' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#183-190' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#201-219' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#222-240' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#243-247' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#250-253' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#256-263' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#266-273' 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_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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#276-278' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#281-288' 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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#292-297' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Serialize newtypes without an object wrapper.</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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#300-343' 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_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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#346-348' 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_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_json/type.Result.html" title="type serde_json::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_json/ser.rs.html#351-356' 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_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>(self, 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;) -&gt; <a class="type" href="../serde_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeSeq" title="type serde::ser::Serializer::SerializeSeq">SerializeSeq</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#359-386' 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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTuple" title="type serde::ser::Serializer::SerializeTuple">SerializeTuple</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#389-391' 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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type serde::ser::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#394-400' 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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type serde::ser::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#403-432' 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>(self, 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;) -&gt; <a class="type" href="../serde_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeMap" title="type serde::ser::Serializer::SerializeMap">SerializeMap</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#435-462' 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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeStruct" title="type serde::ser::Serializer::SerializeStruct">SerializeStruct</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#466-468' 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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.SerializeStructVariant" title="type serde::ser::Serializer::SerializeStructVariant">SerializeStructVariant</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#481-510' 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.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:&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_json/type.Result.html" title="type serde_json::Result">Result</a>&lt;Self::<a class="type" href="../serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</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>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/serde_json/ser.rs.html#512-565' 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><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.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/ser/mod.rs.html#1538-1540' 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></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_json";
</script>
<script src="../main.js"></script>
<script defer src="../search-index.js"></script>
</body>
</html>