1 <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A data format that can serialize any data structure supported by Serde."><title>Serializer in bdk_chain::bitcoin::hashes::serde::ser - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (78a775127 2024-05-11)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../../../bdk_chain/index.html">bdk_chain</a><span class="version">0.20.0</span></h2></div><h2 class="location"><a href="#">Serializer</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error">Error</a></li><li><a href="#associatedtype.Ok">Ok</a></li><li><a href="#associatedtype.SerializeMap">SerializeMap</a></li><li><a href="#associatedtype.SerializeSeq">SerializeSeq</a></li><li><a href="#associatedtype.SerializeStruct">SerializeStruct</a></li><li><a href="#associatedtype.SerializeStructVariant">SerializeStructVariant</a></li><li><a href="#associatedtype.SerializeTuple">SerializeTuple</a></li><li><a href="#associatedtype.SerializeTupleStruct">SerializeTupleStruct</a></li><li><a href="#associatedtype.SerializeTupleVariant">SerializeTupleVariant</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.serialize_bool">serialize_bool</a></li><li><a href="#tymethod.serialize_bytes">serialize_bytes</a></li><li><a href="#tymethod.serialize_char">serialize_char</a></li><li><a href="#tymethod.serialize_f32">serialize_f32</a></li><li><a href="#tymethod.serialize_f64">serialize_f64</a></li><li><a href="#tymethod.serialize_i16">serialize_i16</a></li><li><a href="#tymethod.serialize_i32">serialize_i32</a></li><li><a href="#tymethod.serialize_i64">serialize_i64</a></li><li><a href="#tymethod.serialize_i8">serialize_i8</a></li><li><a href="#tymethod.serialize_map">serialize_map</a></li><li><a href="#tymethod.serialize_newtype_struct">serialize_newtype_struct</a></li><li><a href="#tymethod.serialize_newtype_variant">serialize_newtype_variant</a></li><li><a href="#tymethod.serialize_none">serialize_none</a></li><li><a href="#tymethod.serialize_seq">serialize_seq</a></li><li><a href="#tymethod.serialize_some">serialize_some</a></li><li><a href="#tymethod.serialize_str">serialize_str</a></li><li><a href="#tymethod.serialize_struct">serialize_struct</a></li><li><a href="#tymethod.serialize_struct_variant">serialize_struct_variant</a></li><li><a href="#tymethod.serialize_tuple">serialize_tuple</a></li><li><a href="#tymethod.serialize_tuple_struct">serialize_tuple_struct</a></li><li><a href="#tymethod.serialize_tuple_variant">serialize_tuple_variant</a></li><li><a href="#tymethod.serialize_u16">serialize_u16</a></li><li><a href="#tymethod.serialize_u32">serialize_u32</a></li><li><a href="#tymethod.serialize_u64">serialize_u64</a></li><li><a href="#tymethod.serialize_u8">serialize_u8</a></li><li><a href="#tymethod.serialize_unit">serialize_unit</a></li><li><a href="#tymethod.serialize_unit_struct">serialize_unit_struct</a></li><li><a href="#tymethod.serialize_unit_variant">serialize_unit_variant</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.collect_map">collect_map</a></li><li><a href="#method.collect_seq">collect_seq</a></li><li><a href="#method.collect_str">collect_str</a></li><li><a href="#method.is_human_readable">is_human_readable</a></li><li><a href="#method.serialize_i128">serialize_i128</a></li><li><a href="#method.serialize_u128">serialize_u128</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Serializer-for-%26mut+Serializer%3CW,+F%3E">&'a mut Serializer<W, F></a></li><li><a href="#impl-Serializer-for-%26mut+Formatter%3C'a%3E">&mut Formatter<'a></a></li><li><a href="#impl-Serializer-for-Serializer">Serializer</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In bdk_chain::bitcoin::hashes::serde::ser</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../../../index.html">bdk_chain</a>::<wbr><a href="../../../index.html">bitcoin</a>::<wbr><a href="../../index.html">hashes</a>::<wbr><a href="../index.html">serde</a>::<wbr><a href="index.html">ser</a>::<wbr><a class="trait" href="#">Serializer</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#340">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait Serializer: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
2 type <a href="#associatedtype.Ok" class="associatedtype">Ok</a>;
3 type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="trait.Error.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::Error">Error</a>;
4 type <a href="#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a>: <a class="trait" href="trait.SerializeSeq.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeSeq">SerializeSeq</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
5 type <a href="#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a>: <a class="trait" href="trait.SerializeTuple.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTuple">SerializeTuple</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
6 type <a href="#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a>: <a class="trait" href="trait.SerializeTupleStruct.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTupleStruct">SerializeTupleStruct</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
7 type <a href="#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a>: <a class="trait" href="trait.SerializeTupleVariant.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTupleVariant">SerializeTupleVariant</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
8 type <a href="#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a>: <a class="trait" href="trait.SerializeMap.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeMap">SerializeMap</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
9 type <a href="#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a>: <a class="trait" href="trait.SerializeStruct.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeStruct">SerializeStruct</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
10 type <a href="#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a>: <a class="trait" href="trait.SerializeStructVariant.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeStructVariant">SerializeStructVariant</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
12 <details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 34 methods</span></summary> // Required methods
13 fn <a href="#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
14 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
15 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
16 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
17 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_i64" class="fn">serialize_i64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
18 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_u8" class="fn">serialize_u8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
19 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_u16" class="fn">serialize_u16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
20 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_u32" class="fn">serialize_u32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
21 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_u64" class="fn">serialize_u64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
22 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_f32" class="fn">serialize_f32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
23 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_f64" class="fn">serialize_f64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
24 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_char" class="fn">serialize_char</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
25 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_str" class="fn">serialize_str</a>(self, v: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
26 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_bytes" class="fn">serialize_bytes</a>(self, v: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
27 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_none" class="fn">serialize_none</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
28 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_some" class="fn">serialize_some</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
29 <span class="where">where T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>;
30 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
31 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(
33 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
34 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
35 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
37 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
38 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
39 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
40 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
41 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a><T>(
43 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
44 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
45 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
46 <span class="where">where T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>;
47 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a><T>(
49 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
50 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
51 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
52 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
53 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
54 <span class="where">where T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>;
55 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_seq" class="fn">serialize_seq</a>(
57 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
58 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeSeq" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeSeq">SerializeSeq</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
59 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
61 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
62 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTuple" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTuple">SerializeTuple</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
63 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
65 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
66 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
67 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
68 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
70 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
71 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
72 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
73 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
74 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
75 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_map" class="fn">serialize_map</a>(
77 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
78 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeMap" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeMap">SerializeMap</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
79 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_struct" class="fn">serialize_struct</a>(
81 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
82 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
83 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStruct">SerializeStruct</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
84 <span class="item-spacer"></span> fn <a href="#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
86 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
87 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
88 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
89 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
90 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStructVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStructVariant">SerializeStructVariant</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>;
93 fn <a href="#method.serialize_i128" class="fn">serialize_i128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>> { ... }
94 <span class="item-spacer"></span> fn <a href="#method.serialize_u128" class="fn">serialize_u128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>> { ... }
95 <span class="item-spacer"></span> fn <a href="#method.collect_seq" class="fn">collect_seq</a><I>(self, iter: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
96 <span class="where">where I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
97 <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a></span> { ... }
98 <span class="item-spacer"></span> fn <a href="#method.collect_map" class="fn">collect_map</a><K, V, I>(self, iter: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
99 <span class="where">where K: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a>,
100 V: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a>,
101 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(K, V)</a>></span> { ... }
102 <span class="item-spacer"></span> fn <a href="#method.collect_str" class="fn">collect_str</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>>
103 <span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
104 <span class="item-spacer"></span> fn <a href="#method.is_human_readable" class="fn">is_human_readable</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
105 </details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <strong>data format</strong> that can serialize any data structure supported by Serde.</p>
106 <p>The role of this trait is to define the serialization half of the <a href="https://serde.rs/data-model.html">Serde
107 data model</a>, which is a way to categorize every Rust data structure into one
108 of 29 possible types. Each method of the <code>Serializer</code> trait corresponds to
109 one of the types of the data model.</p>
110 <p>Implementations of <code>Serialize</code> map themselves into this data model by
111 invoking exactly one of the <code>Serializer</code> methods.</p>
112 <p>The types that make up the Serde data model are:</p>
114 <li><strong>14 primitive types</strong>
117 <li>i8, i16, i32, i64, i128</li>
118 <li>u8, u16, u32, u64, u128</li>
123 <li><strong>string</strong>
125 <li>UTF-8 bytes with a length and no null terminator.</li>
126 <li>When serializing, all strings are handled equally. When deserializing,
127 there are three flavors of strings: transient, owned, and borrowed.</li>
130 <li><strong>byte array</strong> - [u8]
132 <li>Similar to strings, during deserialization byte arrays can be
133 transient, owned, or borrowed.</li>
136 <li><strong>option</strong>
138 <li>Either none or some value.</li>
141 <li><strong>unit</strong>
143 <li>The type of <code>()</code> in Rust. It represents an anonymous value containing
147 <li><strong>unit_struct</strong>
149 <li>For example <code>struct Unit</code> or <code>PhantomData<T></code>. It represents a named
150 value containing no data.</li>
153 <li><strong>unit_variant</strong>
155 <li>For example the <code>E::A</code> and <code>E::B</code> in <code>enum E { A, B }</code>.</li>
158 <li><strong>newtype_struct</strong>
160 <li>For example <code>struct Millimeters(u8)</code>.</li>
163 <li><strong>newtype_variant</strong>
165 <li>For example the <code>E::N</code> in <code>enum E { N(u8) }</code>.</li>
168 <li><strong>seq</strong>
170 <li>A variably sized heterogeneous sequence of values, for example
171 <code>Vec<T></code> or <code>HashSet<T></code>. When serializing, the length may or may not
172 be known before iterating through all the data. When deserializing,
173 the length is determined by looking at the serialized data.</li>
176 <li><strong>tuple</strong>
178 <li>A statically sized heterogeneous sequence of values for which the
179 length will be known at deserialization time without looking at the
180 serialized data, for example <code>(u8,)</code> or <code>(String, u64, Vec<T>)</code> or
181 <code>[u64; 10]</code>.</li>
184 <li><strong>tuple_struct</strong>
186 <li>A named tuple, for example <code>struct Rgb(u8, u8, u8)</code>.</li>
189 <li><strong>tuple_variant</strong>
191 <li>For example the <code>E::T</code> in <code>enum E { T(u8, u8) }</code>.</li>
194 <li><strong>map</strong>
196 <li>A heterogeneous key-value pairing, for example <code>BTreeMap<K, V></code>.</li>
199 <li><strong>struct</strong>
201 <li>A heterogeneous key-value pairing in which the keys are strings and
202 will be known at deserialization time without looking at the
203 serialized data, for example <code>struct S { r: u8, g: u8, b: u8 }</code>.</li>
206 <li><strong>struct_variant</strong>
208 <li>For example the <code>E::S</code> in <code>enum E { S { r: u8, g: u8, b: u8 } }</code>.</li>
212 <p>Many Serde serializers produce text or binary data as output, for example
213 JSON or Postcard. This is not a requirement of the <code>Serializer</code> trait, and
214 there are serializers that do not produce text or binary output. One example
215 is the <code>serde_json::value::Serializer</code> (distinct from the main <code>serde_json</code>
216 serializer) that produces a <code>serde_json::Value</code> data structure in memory as
218 <h2 id="example-implementation"><a class="doc-anchor" href="#example-implementation">§</a>Example implementation</h2>
219 <p>The <a href="https://serde.rs/data-format.html">example data format</a> presented on the website contains example code for
220 a basic JSON <code>Serializer</code>.</p>
221 </div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Ok" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#349">source</a><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a></h4></section></summary><div class="docblock"><p>The output type produced by this <code>Serializer</code> during successful
222 serialization. Most serializers that produce text or binary output
223 should set <code>Ok = ()</code> and serialize into an <a href="https://doc.rust-lang.org/std/io/trait.Write.html"><code>io::Write</code></a> or buffer
224 contained within the <code>Serializer</code> instance. Serializers that build
225 in-memory data structures may be simplified by using <code>Ok</code> to propagate
226 the data structure around.</p>
227 </div></details><details class="toggle" open><summary><section id="associatedtype.Error" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#352">source</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="trait.Error.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::Error">Error</a></h4></section></summary><div class="docblock"><p>The error type when some error occurs during serialization.</p>
228 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeSeq" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#358">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a>: <a class="trait" href="trait.SerializeSeq.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeSeq">SerializeSeq</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_seq"><code>serialize_seq</code></a> for serializing the content of the
230 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTuple" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#364">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a>: <a class="trait" href="trait.SerializeTuple.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTuple">SerializeTuple</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_tuple"><code>serialize_tuple</code></a> for serializing the content of
232 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTupleStruct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#370">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a>: <a class="trait" href="trait.SerializeTupleStruct.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTupleStruct">SerializeTupleStruct</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_tuple_struct"><code>serialize_tuple_struct</code></a> for serializing the
233 content of the tuple struct.</p>
234 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeTupleVariant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#376">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a>: <a class="trait" href="trait.SerializeTupleVariant.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeTupleVariant">SerializeTupleVariant</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_tuple_variant"><code>serialize_tuple_variant</code></a> for serializing the
235 content of the tuple variant.</p>
236 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeMap" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#382">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a>: <a class="trait" href="trait.SerializeMap.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeMap">SerializeMap</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_map"><code>serialize_map</code></a> for serializing the content of the
238 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeStruct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#388">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a>: <a class="trait" href="trait.SerializeStruct.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeStruct">SerializeStruct</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_struct"><code>serialize_struct</code></a> for serializing the content of
240 </div></details><details class="toggle" open><summary><section id="associatedtype.SerializeStructVariant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#394">source</a><h4 class="code-header">type <a href="#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a>: <a class="trait" href="trait.SerializeStructVariant.html" title="trait bdk_chain::bitcoin::hashes::serde::ser::SerializeStructVariant">SerializeStructVariant</a><Ok = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Error = Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Type returned from <a href="#tymethod.serialize_struct_variant"><code>serialize_struct_variant</code></a> for serializing the
241 content of the struct variant.</p>
242 </div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_bool" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#412">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>bool</code> value.</p>
244 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>bool {
245 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
246 <span class="kw">where
247 </span>S: Serializer,
249 serializer.serialize_bool(<span class="kw-2">*</span><span class="self">self</span>)
252 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_i8" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#434">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>i8</code> value.</p>
253 <p>If the format does not differentiate between <code>i8</code> and <code>i64</code>, a
254 reasonable implementation would be to cast the value to <code>i64</code> and
255 forward to <code>serialize_i64</code>.</p>
257 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>i8 {
258 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
259 <span class="kw">where
260 </span>S: Serializer,
262 serializer.serialize_i8(<span class="kw-2">*</span><span class="self">self</span>)
265 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_i16" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#456">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>i16</code> value.</p>
266 <p>If the format does not differentiate between <code>i16</code> and <code>i64</code>, a
267 reasonable implementation would be to cast the value to <code>i64</code> and
268 forward to <code>serialize_i64</code>.</p>
270 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>i16 {
271 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
272 <span class="kw">where
273 </span>S: Serializer,
275 serializer.serialize_i16(<span class="kw-2">*</span><span class="self">self</span>)
278 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_i32" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#478">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>i32</code> value.</p>
279 <p>If the format does not differentiate between <code>i32</code> and <code>i64</code>, a
280 reasonable implementation would be to cast the value to <code>i64</code> and
281 forward to <code>serialize_i64</code>.</p>
283 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>i32 {
284 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
285 <span class="kw">where
286 </span>S: Serializer,
288 serializer.serialize_i32(<span class="kw-2">*</span><span class="self">self</span>)
291 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_i64" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#496">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_i64" class="fn">serialize_i64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>i64</code> value.</p>
293 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>i64 {
294 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
295 <span class="kw">where
296 </span>S: Serializer,
298 serializer.serialize_i64(<span class="kw-2">*</span><span class="self">self</span>)
301 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_u8" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#541">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_u8" class="fn">serialize_u8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>u8</code> value.</p>
302 <p>If the format does not differentiate between <code>u8</code> and <code>u64</code>, a
303 reasonable implementation would be to cast the value to <code>u64</code> and
304 forward to <code>serialize_u64</code>.</p>
306 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>u8 {
307 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
308 <span class="kw">where
309 </span>S: Serializer,
311 serializer.serialize_u8(<span class="kw-2">*</span><span class="self">self</span>)
314 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_u16" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#563">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_u16" class="fn">serialize_u16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>u16</code> value.</p>
315 <p>If the format does not differentiate between <code>u16</code> and <code>u64</code>, a
316 reasonable implementation would be to cast the value to <code>u64</code> and
317 forward to <code>serialize_u64</code>.</p>
319 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>u16 {
320 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
321 <span class="kw">where
322 </span>S: Serializer,
324 serializer.serialize_u16(<span class="kw-2">*</span><span class="self">self</span>)
327 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_u32" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#585">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_u32" class="fn">serialize_u32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>u32</code> value.</p>
328 <p>If the format does not differentiate between <code>u32</code> and <code>u64</code>, a
329 reasonable implementation would be to cast the value to <code>u64</code> and
330 forward to <code>serialize_u64</code>.</p>
332 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>u32 {
333 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
334 <span class="kw">where
335 </span>S: Serializer,
337 serializer.serialize_u32(<span class="kw-2">*</span><span class="self">self</span>)
340 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_u64" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#603">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_u64" class="fn">serialize_u64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>u64</code> value.</p>
342 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>u64 {
343 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
344 <span class="kw">where
345 </span>S: Serializer,
347 serializer.serialize_u64(<span class="kw-2">*</span><span class="self">self</span>)
350 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_f32" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#648">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_f32" class="fn">serialize_f32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>f32</code> value.</p>
351 <p>If the format does not differentiate between <code>f32</code> and <code>f64</code>, a
352 reasonable implementation would be to cast the value to <code>f64</code> and
353 forward to <code>serialize_f64</code>.</p>
355 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>f32 {
356 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
357 <span class="kw">where
358 </span>S: Serializer,
360 serializer.serialize_f32(<span class="kw-2">*</span><span class="self">self</span>)
363 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_f64" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#666">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_f64" class="fn">serialize_f64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>f64</code> value.</p>
365 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>f64 {
366 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
367 <span class="kw">where
368 </span>S: Serializer,
370 serializer.serialize_f64(<span class="kw-2">*</span><span class="self">self</span>)
373 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_char" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#687">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_char" class="fn">serialize_char</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a character.</p>
374 <p>If the format does not support characters, it is reasonable to serialize
375 it as a single element <code>str</code> or a <code>u32</code>.</p>
377 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>char {
378 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
379 <span class="kw">where
380 </span>S: Serializer,
382 serializer.serialize_char(<span class="kw-2">*</span><span class="self">self</span>)
385 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_str" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#705">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_str" class="fn">serialize_str</a>(self, v: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>&str</code>.</p>
387 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>str {
388 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
389 <span class="kw">where
390 </span>S: Serializer,
392 serializer.serialize_str(<span class="self">self</span>)
395 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_bytes" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#740">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_bytes" class="fn">serialize_bytes</a>(self, v: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a chunk of raw byte data.</p>
396 <p>Enables serializers to serialize byte slices more compactly or more
397 efficiently than other types of slices. If no efficient implementation
398 is available, a reasonable implementation would be to forward to
399 <code>serialize_seq</code>. If forwarded, the implementation looks usually just
402 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>serialize_bytes(<span class="self">self</span>, v: <span class="kw-2">&</span>[u8]) -> <span class="prelude-ty">Result</span><<span class="self">Self</span>::Ok, <span class="self">Self</span>::Error> {
403 <span class="kw">let </span><span class="kw-2">mut </span>seq = <span class="self">self</span>.serialize_seq(<span class="prelude-val">Some</span>(v.len()))<span class="question-mark">?</span>;
404 <span class="kw">for </span>b <span class="kw">in </span>v {
405 seq.serialize_element(b)<span class="question-mark">?</span>;
409 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_none" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#773">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_none" class="fn">serialize_none</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <a href="https://doc.rust-lang.org/std/option/enum.Option.html#variant.None"><code>None</code></a> value.</p>
411 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl</span><T> Serialize <span class="kw">for </span><span class="prelude-ty">Option</span><T>
412 <span class="kw">where
415 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
416 <span class="kw">where
417 </span>S: Serializer,
419 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
420 <span class="prelude-val">Some</span>(<span class="kw-2">ref </span>value) => serializer.serialize_some(value),
421 <span class="prelude-val">None </span>=> serializer.serialize_none(),
425 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_some" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#806-808">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_some" class="fn">serialize_some</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
426 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Serialize a <a href="https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some"><code>Some(T)</code></a> value.</p>
428 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl</span><T> Serialize <span class="kw">for </span><span class="prelude-ty">Option</span><T>
429 <span class="kw">where
432 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
433 <span class="kw">where
434 </span>S: Serializer,
436 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
437 <span class="prelude-val">Some</span>(<span class="kw-2">ref </span>value) => serializer.serialize_some(value),
438 <span class="prelude-val">None </span>=> serializer.serialize_none(),
442 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_unit" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#826">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>()</code> value.</p>
444 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>() {
445 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
446 <span class="kw">where
447 </span>S: Serializer,
449 serializer.serialize_unit()
452 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_unit_struct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#846">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(
454 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
455 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a unit struct like <code>struct Unit</code> or <code>PhantomData<T></code>.</p>
456 <p>A reasonable implementation would be to forward to <code>serialize_unit</code>.</p>
458 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
460 <span class="kw">struct </span>Nothing;
462 <span class="kw">impl </span>Serialize <span class="kw">for </span>Nothing {
463 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
464 <span class="kw">where
465 </span>S: Serializer,
467 serializer.serialize_unit_struct(<span class="string">"Nothing"</span>)
470 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_unit_variant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#874-879">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
472 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
473 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
474 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
475 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a unit variant like <code>E::A</code> in <code>enum E { A, B }</code>.</p>
476 <p>The <code>name</code> is the name of the enum, the <code>variant_index</code> is the index of
477 this variant within the enum, and the <code>variant</code> is the name of the
480 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
482 <span class="kw">enum </span>E {
487 <span class="kw">impl </span>Serialize <span class="kw">for </span>E {
488 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
489 <span class="kw">where
490 </span>S: Serializer,
492 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
493 E::A => serializer.serialize_unit_variant(<span class="string">"E"</span>, <span class="number">0</span>, <span class="string">"A"</span>),
494 E::B => serializer.serialize_unit_variant(<span class="string">"E"</span>, <span class="number">1</span>, <span class="string">"B"</span>),
498 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_newtype_struct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#901-907">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a><T>(
500 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
501 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
502 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
503 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Serialize a newtype struct like <code>struct Millimeters(u8)</code>.</p>
504 <p>Serializers are encouraged to treat newtype structs as insignificant
505 wrappers around the data they contain. A reasonable implementation would
506 be to forward to <code>value.serialize(self)</code>.</p>
508 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
510 <span class="kw">struct </span>Millimeters(u8);
512 <span class="kw">impl </span>Serialize <span class="kw">for </span>Millimeters {
513 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
514 <span class="kw">where
515 </span>S: Serializer,
517 serializer.serialize_newtype_struct(<span class="string">"Millimeters"</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span>)
520 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_newtype_variant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#935-943">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a><T>(
522 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
523 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
524 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
525 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
526 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
527 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Serialize a newtype variant like <code>E::N</code> in <code>enum E { N(u8) }</code>.</p>
528 <p>The <code>name</code> is the name of the enum, the <code>variant_index</code> is the index of
529 this variant within the enum, and the <code>variant</code> is the name of the
530 variant. The <code>value</code> is the data contained within this newtype variant.</p>
532 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
534 <span class="kw">enum </span>E {
539 <span class="kw">impl </span>Serialize <span class="kw">for </span>E {
540 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
541 <span class="kw">where
542 </span>S: Serializer,
544 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
545 E::M(<span class="kw-2">ref </span>s) => serializer.serialize_newtype_variant(<span class="string">"E"</span>, <span class="number">0</span>, <span class="string">"M"</span>, s),
546 E::N(n) => serializer.serialize_newtype_variant(<span class="string">"E"</span>, <span class="number">1</span>, <span class="string">"N"</span>, <span class="kw-2">&</span>n),
550 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_seq" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#991">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_seq" class="fn">serialize_seq</a>(
552 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
553 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeSeq" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeSeq">SerializeSeq</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Begin to serialize a variably sized sequence. This call must be
554 followed by zero or more calls to <code>serialize_element</code>, then a call to
555 <code>end</code>.</p>
556 <p>The argument is the number of elements in the sequence, which may or may
557 not be computable before the sequence is iterated. Some serializers only
558 support sequences whose length is known up front.</p>
560 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeSeq, Serializer};
562 <span class="kw">impl</span><T> Serialize <span class="kw">for </span>Vec<T>
563 <span class="kw">where
566 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
567 <span class="kw">where
568 </span>S: Serializer,
570 <span class="kw">let </span><span class="kw-2">mut </span>seq = serializer.serialize_seq(<span class="prelude-val">Some</span>(<span class="self">self</span>.len()))<span class="question-mark">?</span>;
571 <span class="kw">for </span>element <span class="kw">in </span><span class="self">self </span>{
572 seq.serialize_element(element)<span class="question-mark">?</span>;
577 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_tuple" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1047">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
579 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
580 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTuple" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTuple">SerializeTuple</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Begin to serialize a statically sized sequence whose length will be
581 known at deserialization time without looking at the serialized data.
582 This call must be followed by zero or more calls to <code>serialize_element</code>,
583 then a call to <code>end</code>.</p>
585 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeTuple, Serializer};
587 <span class="kw">impl</span><A, B, C> Serialize <span class="kw">for </span>(A, B, C)
588 <span class="kw">where
593 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
594 <span class="kw">where
595 </span>S: Serializer,
597 <span class="kw">let </span><span class="kw-2">mut </span>tup = serializer.serialize_tuple(<span class="number">3</span>)<span class="question-mark">?</span>;
598 tup.serialize_element(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span>)<span class="question-mark">?</span>;
599 tup.serialize_element(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">1</span>)<span class="question-mark">?</span>;
600 tup.serialize_element(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">2</span>)<span class="question-mark">?</span>;
605 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeTuple, Serializer};
607 <span class="kw">const </span>VRAM_SIZE: usize = <span class="number">386</span>;
608 <span class="kw">struct </span>Vram([u16; VRAM_SIZE]);
610 <span class="kw">impl </span>Serialize <span class="kw">for </span>Vram {
611 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
612 <span class="kw">where
613 </span>S: Serializer,
615 <span class="kw">let </span><span class="kw-2">mut </span>seq = serializer.serialize_tuple(VRAM_SIZE)<span class="question-mark">?</span>;
616 <span class="kw">for </span>element <span class="kw">in </span><span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span>[..] {
617 seq.serialize_element(element)<span class="question-mark">?</span>;
622 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_tuple_struct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1074-1078">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
624 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
625 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
626 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Begin to serialize a tuple struct like <code>struct Rgb(u8, u8, u8)</code>. This
627 call must be followed by zero or more calls to <code>serialize_field</code>, then a
628 call to <code>end</code>.</p>
629 <p>The <code>name</code> is the name of the tuple struct and the <code>len</code> is the number
630 of data fields that will be serialized.</p>
632 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeTupleStruct, Serializer};
634 <span class="kw">struct </span>Rgb(u8, u8, u8);
636 <span class="kw">impl </span>Serialize <span class="kw">for </span>Rgb {
637 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
638 <span class="kw">where
639 </span>S: Serializer,
641 <span class="kw">let </span><span class="kw-2">mut </span>ts = serializer.serialize_tuple_struct(<span class="string">"Rgb"</span>, <span class="number">3</span>)<span class="question-mark">?</span>;
642 ts.serialize_field(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">0</span>)<span class="question-mark">?</span>;
643 ts.serialize_field(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">1</span>)<span class="question-mark">?</span>;
644 ts.serialize_field(<span class="kw-2">&</span><span class="self">self</span>.<span class="number">2</span>)<span class="question-mark">?</span>;
648 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_tuple_variant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1119-1125">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
650 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
651 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
652 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
653 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
654 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><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
655 <code>serialize_field</code>, then a call to <code>end</code>.</p>
656 <p>The <code>name</code> is the name of the enum, the <code>variant_index</code> is the index of
657 this variant within the enum, the <code>variant</code> is the name of the variant,
658 and the <code>len</code> is the number of data fields that will be serialized.</p>
660 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeTupleVariant, Serializer};
662 <span class="kw">enum </span>E {
667 <span class="kw">impl </span>Serialize <span class="kw">for </span>E {
668 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
669 <span class="kw">where
670 </span>S: Serializer,
672 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
673 E::T(<span class="kw-2">ref </span>a, <span class="kw-2">ref </span>b) => {
674 <span class="kw">let </span><span class="kw-2">mut </span>tv = serializer.serialize_tuple_variant(<span class="string">"E"</span>, <span class="number">0</span>, <span class="string">"T"</span>, <span class="number">2</span>)<span class="question-mark">?</span>;
675 tv.serialize_field(a)<span class="question-mark">?</span>;
676 tv.serialize_field(b)<span class="question-mark">?</span>;
679 E::U(<span class="kw-2">ref </span>a, <span class="kw-2">ref </span>b, <span class="kw-2">ref </span>c) => {
680 <span class="kw">let </span><span class="kw-2">mut </span>tv = serializer.serialize_tuple_variant(<span class="string">"E"</span>, <span class="number">1</span>, <span class="string">"U"</span>, <span class="number">3</span>)<span class="question-mark">?</span>;
681 tv.serialize_field(a)<span class="question-mark">?</span>;
682 tv.serialize_field(b)<span class="question-mark">?</span>;
683 tv.serialize_field(c)<span class="question-mark">?</span>;
689 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_map" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1173">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_map" class="fn">serialize_map</a>(
691 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
692 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeMap" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeMap">SerializeMap</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Begin to serialize a map. This call must be followed by zero or more
693 calls to <code>serialize_key</code> and <code>serialize_value</code>, then a call to <code>end</code>.</p>
694 <p>The argument is the number of elements in the map, which may or may not
695 be computable before the map is iterated. Some serializers only support
696 maps whose length is known up front.</p>
698 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeMap, Serializer};
700 <span class="kw">impl</span><K, V> Serialize <span class="kw">for </span>HashMap<K, V>
701 <span class="kw">where
705 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
706 <span class="kw">where
707 </span>S: Serializer,
709 <span class="kw">let </span><span class="kw-2">mut </span>map = serializer.serialize_map(<span class="prelude-val">Some</span>(<span class="self">self</span>.len()))<span class="question-mark">?</span>;
710 <span class="kw">for </span>(k, v) <span class="kw">in </span><span class="self">self </span>{
711 map.serialize_entry(k, v)<span class="question-mark">?</span>;
716 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_struct" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1205-1209">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct" class="fn">serialize_struct</a>(
718 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
719 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
720 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStruct">SerializeStruct</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Begin to serialize a struct like <code>struct Rgb { r: u8, g: u8, b: u8 }</code>.
721 This call must be followed by zero or more calls to <code>serialize_field</code>,
722 then a call to <code>end</code>.</p>
723 <p>The <code>name</code> is the name of the struct and the <code>len</code> is the number of
724 data fields that will be serialized. <code>len</code> does not include fields
725 which are skipped with <a href="trait.SerializeStruct.html#method.skip_field" title="method bdk_chain::bitcoin::hashes::serde::ser::SerializeStruct::skip_field"><code>SerializeStruct::skip_field</code></a>.</p>
727 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeStruct, Serializer};
729 <span class="kw">struct </span>Rgb {
735 <span class="kw">impl </span>Serialize <span class="kw">for </span>Rgb {
736 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
737 <span class="kw">where
738 </span>S: Serializer,
740 <span class="kw">let </span><span class="kw-2">mut </span>rgb = serializer.serialize_struct(<span class="string">"Rgb"</span>, <span class="number">3</span>)<span class="question-mark">?</span>;
741 rgb.serialize_field(<span class="string">"r"</span>, <span class="kw-2">&</span><span class="self">self</span>.r)<span class="question-mark">?</span>;
742 rgb.serialize_field(<span class="string">"g"</span>, <span class="kw-2">&</span><span class="self">self</span>.g)<span class="question-mark">?</span>;
743 rgb.serialize_field(<span class="string">"b"</span>, <span class="kw-2">&</span><span class="self">self</span>.b)<span class="question-mark">?</span>;
747 </div></details><details class="toggle method-toggle" open><summary><section id="tymethod.serialize_struct_variant" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1249-1255">source</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
749 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
750 variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
751 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
752 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
753 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStructVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStructVariant">SerializeStructVariant</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><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
754 <code>serialize_field</code>, then a call to <code>end</code>.</p>
755 <p>The <code>name</code> is the name of the enum, the <code>variant_index</code> is the index of
756 this variant within the enum, the <code>variant</code> is the name of the variant,
757 and the <code>len</code> is the number of data fields that will be serialized.
758 <code>len</code> does not include fields which are skipped with
759 <a href="trait.SerializeStructVariant.html#method.skip_field" title="method bdk_chain::bitcoin::hashes::serde::ser::SerializeStructVariant::skip_field"><code>SerializeStructVariant::skip_field</code></a>.</p>
761 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::{Serialize, SerializeStructVariant, Serializer};
763 <span class="kw">enum </span>E {
764 S { r: u8, g: u8, b: u8 },
767 <span class="kw">impl </span>Serialize <span class="kw">for </span>E {
768 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
769 <span class="kw">where
770 </span>S: Serializer,
772 <span class="kw">match </span><span class="kw-2">*</span><span class="self">self </span>{
774 <span class="kw-2">ref </span>r,
775 <span class="kw-2">ref </span>g,
776 <span class="kw-2">ref </span>b,
778 <span class="kw">let </span><span class="kw-2">mut </span>sv = serializer.serialize_struct_variant(<span class="string">"E"</span>, <span class="number">0</span>, <span class="string">"S"</span>, <span class="number">3</span>)<span class="question-mark">?</span>;
779 sv.serialize_field(<span class="string">"r"</span>, r)<span class="question-mark">?</span>;
780 sv.serialize_field(<span class="string">"g"</span>, g)<span class="question-mark">?</span>;
781 sv.serialize_field(<span class="string">"b"</span>, b)<span class="question-mark">?</span>;
787 </div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.serialize_i128" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#516">source</a><h4 class="code-header">fn <a href="#method.serialize_i128" class="fn">serialize_i128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize an <code>i128</code> value.</p>
789 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>i128 {
790 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
791 <span class="kw">where
792 </span>S: Serializer,
794 serializer.serialize_i128(<span class="kw-2">*</span><span class="self">self</span>)
797 <p>The default behavior unconditionally returns an error.</p>
798 </div></details><details class="toggle method-toggle" open><summary><section id="method.serialize_u128" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#623">source</a><h4 class="code-header">fn <a href="#method.serialize_u128" class="fn">serialize_u128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>></h4></section></summary><div class="docblock"><p>Serialize a <code>u128</code> value.</p>
800 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>Serialize <span class="kw">for </span>u128 {
801 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
802 <span class="kw">where
803 </span>S: Serializer,
805 serializer.serialize_u128(<span class="kw-2">*</span><span class="self">self</span>)
808 <p>The default behavior unconditionally returns an error.</p>
809 </div></details><details class="toggle method-toggle" open><summary><section id="method.collect_seq" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1281-1284">source</a><h4 class="code-header">fn <a href="#method.collect_seq" class="fn">collect_seq</a><I>(self, iter: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
810 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
811 <I as <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a>,</div></h4></section></summary><div class="docblock"><p>Collect an iterator as a sequence.</p>
812 <p>The default implementation serializes each item yielded by the iterator
813 using <a href="#tymethod.serialize_seq"><code>serialize_seq</code></a>. Implementors should not need to override this
816 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
818 <span class="kw">struct </span>SecretlyOneHigher {
819 data: Vec<i32>,
822 <span class="kw">impl </span>Serialize <span class="kw">for </span>SecretlyOneHigher {
823 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
824 <span class="kw">where
825 </span>S: Serializer,
827 serializer.collect_seq(<span class="self">self</span>.data.iter().map(|x| x + <span class="number">1</span>))
830 </div></details><details class="toggle method-toggle" open><summary><section id="method.collect_map" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1318-1322">source</a><h4 class="code-header">fn <a href="#method.collect_map" class="fn">collect_map</a><K, V, I>(self, iter: I) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
831 K: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a>,
832 V: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a>,
833 I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(K, V)</a>>,</div></h4></section></summary><div class="docblock"><p>Collect an iterator as a map.</p>
834 <p>The default implementation serializes each pair yielded by the iterator
835 using <a href="#tymethod.serialize_map"><code>serialize_map</code></a>. Implementors should not need to override this
838 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
839 <span class="kw">use </span>std::collections::BTreeSet;
841 <span class="kw">struct </span>MapToUnit {
842 keys: BTreeSet<i32>,
845 <span class="comment">// Serializes as a map in which the values are all unit.
846 </span><span class="kw">impl </span>Serialize <span class="kw">for </span>MapToUnit {
847 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
848 <span class="kw">where
849 </span>S: Serializer,
851 serializer.collect_map(<span class="self">self</span>.keys.iter().map(|k| (k, ())))
854 </div></details><details class="toggle method-toggle" open><summary><section id="method.collect_str" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1359-1361">source</a><h4 class="code-header">fn <a href="#method.collect_str" class="fn">collect_str</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Ok" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Ok">Ok</a>, Self::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.Error" title="type bdk_chain::bitcoin::hashes::serde::Serializer::Error">Error</a>><div class="where">where
855 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>,</div></h4></section></summary><div class="docblock"><p>Serialize a string produced by an implementation of <code>Display</code>.</p>
856 <p>The default implementation builds a heap-allocated <a href="https://doc.rust-lang.org/std/string/struct.String.html"><code>String</code></a> and
857 delegates to <a href="#tymethod.serialize_str"><code>serialize_str</code></a>. Serializers are encouraged to provide a
858 more efficient implementation if possible.</p>
860 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
862 <span class="kw">impl </span>Serialize <span class="kw">for </span>DateTime {
863 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
864 <span class="kw">where
865 </span>S: Serializer,
867 serializer.collect_str(<span class="kw-2">&</span><span class="macro">format_args!</span>(<span class="string">"{:?}{:?}"</span>, <span class="self">self</span>.naive_local(), <span class="self">self</span>.offset()))
870 </div></details><details class="toggle method-toggle" open><summary><section id="method.is_human_readable" class="method"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/mod.rs.html#1445">source</a><h4 class="code-header">fn <a href="#method.is_human_readable" class="fn">is_human_readable</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Determine whether <code>Serialize</code> implementations should serialize in
871 human-readable form.</p>
872 <p>Some types have a human-readable form that may be somewhat expensive to
873 construct, as well as a binary form that is compact and efficient.
874 Generally text-based formats like JSON and YAML will prefer to use the
875 human-readable one and binary formats like Postcard will prefer the
878 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::{Serialize, Serializer};
880 <span class="kw">impl </span>Serialize <span class="kw">for </span>Timestamp {
881 <span class="kw">fn </span>serialize<S>(<span class="kw-2">&</span><span class="self">self</span>, serializer: S) -> <span class="prelude-ty">Result</span><S::Ok, S::Error>
882 <span class="kw">where
883 </span>S: Serializer,
885 <span class="kw">if </span>serializer.is_human_readable() {
886 <span class="comment">// Serialize to a human-readable string "2015-05-15T17:01:00Z".
887 </span><span class="self">self</span>.to_string().serialize(serializer)
888 } <span class="kw">else </span>{
889 <span class="comment">// Serialize to a compact binary representation.
890 </span><span class="self">self</span>.seconds_since_epoch().serialize(serializer)
894 <p>The default implementation of this method returns <code>true</code>. Data formats
895 may override this to <code>false</code> to request a compact form for types that
896 support one. Note that modifying this method to change a format from
897 human-readable to compact or vice versa should be regarded as a breaking
898 change, as a value serialized in human-readable mode is not required to
899 deserialize from the same data in compact mode.</p>
900 </div></details></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Serializer-for-Serializer" class="impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#60">source</a><a href="#impl-Serializer-for-Serializer" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a> for <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Ok-1" class="associatedtype trait-impl"><a href="#associatedtype.Ok-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a> = <a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a></h4></section><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a></h4></section><section id="associatedtype.SerializeSeq-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeSeq-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a> = SerializeVec</h4></section><section id="associatedtype.SerializeTuple-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTuple-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a> = SerializeVec</h4></section><section id="associatedtype.SerializeTupleStruct-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleStruct-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a> = SerializeVec</h4></section><section id="associatedtype.SerializeTupleVariant-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleVariant-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a> = SerializeTupleVariant</h4></section><section id="associatedtype.SerializeMap-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeMap-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a> = SerializeMap</h4></section><section id="associatedtype.SerializeStruct-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStruct-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a> = SerializeMap</h4></section><section id="associatedtype.SerializeStructVariant-1" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStructVariant-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a> = SerializeStructVariant</h4></section><section id="method.serialize_bool" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#73">source</a><a href="#method.serialize_bool" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i8" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#78">source</a><a href="#method.serialize_i8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i16" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#83">source</a><a href="#method.serialize_i16" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i32" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#88">source</a><a href="#method.serialize_i32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i64" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#92">source</a><a href="#method.serialize_i64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i64" class="fn">serialize_i64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i128-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#96">source</a><a href="#method.serialize_i128-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_i128" class="fn">serialize_i128</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u8" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#115">source</a><a href="#method.serialize_u8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u8" class="fn">serialize_u8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u16" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#120">source</a><a href="#method.serialize_u16" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u16" class="fn">serialize_u16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u32" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#125">source</a><a href="#method.serialize_u32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u32" class="fn">serialize_u32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u64" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#130">source</a><a href="#method.serialize_u64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u64" class="fn">serialize_u64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u128-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#134">source</a><a href="#method.serialize_u128-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_u128" class="fn">serialize_u128</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_f32" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#151">source</a><a href="#method.serialize_f32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f32" class="fn">serialize_f32</a>(self, float: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_f64" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#156">source</a><a href="#method.serialize_f64" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f64" class="fn">serialize_f64</a>(self, float: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_char" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#161">source</a><a href="#method.serialize_char" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_char" class="fn">serialize_char</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_str" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#168">source</a><a href="#method.serialize_str" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_str" class="fn">serialize_str</a>(self, value: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_bytes" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#172">source</a><a href="#method.serialize_bytes" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bytes" class="fn">serialize_bytes</a>(self, value: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#178">source</a><a href="#method.serialize_unit" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit_struct" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#183">source</a><a href="#method.serialize_unit_struct" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(self, _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit_variant" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#188-193">source</a><a href="#method.serialize_unit_variant" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
902 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
903 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
904 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
905 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_newtype_struct" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#198-200">source</a><a href="#method.serialize_newtype_struct" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a><T>(
907 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
908 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
909 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
910 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_newtype_variant" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#205-213">source</a><a href="#method.serialize_newtype_variant" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a><T>(
912 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
913 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
914 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
915 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
916 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
917 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_none" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#221">source</a><a href="#method.serialize_none" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_none" class="fn">serialize_none</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_some" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#226-228">source</a><a href="#method.serialize_some" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_some" class="fn">serialize_some</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
918 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_seq" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#233">source</a><a href="#method.serialize_seq" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_seq" class="fn">serialize_seq</a>(
920 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
921 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeSeq" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeSeq">SerializeSeq</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#239">source</a><a href="#method.serialize_tuple" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
923 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
924 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTuple" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTuple">SerializeTuple</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple_struct" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#243-247">source</a><a href="#method.serialize_tuple_struct" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
926 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
927 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
928 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple_variant" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#251-257">source</a><a href="#method.serialize_tuple_variant" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
930 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
931 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
932 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
933 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
934 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_map" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#264">source</a><a href="#method.serialize_map" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_map" class="fn">serialize_map</a>(
936 _len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
937 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeMap" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeMap">SerializeMap</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_struct" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#271">source</a><a href="#method.serialize_struct" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct" class="fn">serialize_struct</a>(
939 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
940 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
941 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStruct">SerializeStruct</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_struct_variant" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#281-287">source</a><a href="#method.serialize_struct_variant" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
943 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
944 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
945 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
946 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
947 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<<a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/value/ser/struct.Serializer.html" title="struct serde_json::value::ser::Serializer">Serializer</a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStructVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStructVariant">SerializeStructVariant</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.collect_str-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/value/ser.rs.html#294-296">source</a><a href="#method.collect_str-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.collect_str" class="fn">collect_str</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
948 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>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Serializer-for-%26mut+Formatter%3C'a%3E" class="impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#38">source</a><a href="#impl-Serializer-for-%26mut+Formatter%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a> for &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a></h3></section></summary><div class="docblock">
949 <div class="example-wrap edition"><a href="#" class="tooltip" title="This example runs with edition 2021">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>serde::ser::Serialize;
950 <span class="kw">use </span>serde_derive::Serialize;
951 <span class="kw">use </span>std::fmt::{<span class="self">self</span>, Display};
953 <span class="attr">#[derive(Serialize)]
954 #[serde(rename_all = <span class="string">"kebab-case"</span>)]
955 </span><span class="kw">pub enum </span>MessageType {
960 <span class="kw">impl </span>Display <span class="kw">for </span>MessageType {
961 <span class="kw">fn </span>fmt(<span class="kw-2">&</span><span class="self">self</span>, f: <span class="kw-2">&mut </span>fmt::Formatter) -> fmt::Result {
962 <span class="self">self</span>.serialize(f)
965 </div><div class="impl-items"><section id="associatedtype.Ok-2" class="associatedtype trait-impl"><a href="#associatedtype.Ok-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a></h4></section><section id="associatedtype.SerializeSeq-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeSeq-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeTuple-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTuple-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeTupleStruct-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleStruct-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeTupleVariant-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleVariant-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeMap-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeMap-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeStruct-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStruct-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="associatedtype.SerializeStructVariant-2" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStructVariant-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a> = <a class="struct" href="struct.Impossible.html" title="struct bdk_chain::bitcoin::hashes::serde::ser::Impossible">Impossible</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_bool-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_bool-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_i8-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_i8-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_i16-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_i16-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_i32-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_i32-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_i64-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_i64-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i64" class="fn">serialize_i64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_i128-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_i128-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_i128" class="fn">serialize_i128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_u8-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_u8-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u8" class="fn">serialize_u8</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_u16-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_u16-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u16" class="fn">serialize_u16</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_u32-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_u32-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u32" class="fn">serialize_u32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_u64-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_u64-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u64" class="fn">serialize_u64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_u128-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_u128-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_u128" class="fn">serialize_u128</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_f32-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_f32-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f32" class="fn">serialize_f32</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_f64-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_f64-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f64" class="fn">serialize_f64</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_char-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_char-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_char" class="fn">serialize_char</a>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_str-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_str-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_str" class="fn">serialize_str</a>(self, v: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_unit_struct-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#49-66">source</a><a href="#method.serialize_unit_struct-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(self, v: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_unit_variant-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#68-73">source</a><a href="#method.serialize_unit_variant-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
967 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
968 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
969 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
970 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_newtype_struct-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#77-79">source</a><a href="#method.serialize_newtype_struct-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a><T>(
972 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
973 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
974 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>><div class="where">where
975 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_bytes-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#84">source</a><a href="#method.serialize_bytes-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bytes" class="fn">serialize_bytes</a>(self, _v: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_none-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#88">source</a><a href="#method.serialize_none-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_none" class="fn">serialize_none</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_some-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#92-94">source</a><a href="#method.serialize_some-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_some" class="fn">serialize_some</a><T>(self, _value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>><div class="where">where
976 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_unit-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#99">source</a><a href="#method.serialize_unit-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_newtype_variant-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#103-111">source</a><a href="#method.serialize_newtype_variant-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a><T>(
978 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
979 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
980 _variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
981 _value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
982 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>><div class="where">where
983 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_seq-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#116">source</a><a href="#method.serialize_seq-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_seq" class="fn">serialize_seq</a>(
985 _len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
986 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeSeq" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeSeq">SerializeSeq</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_tuple-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#120">source</a><a href="#method.serialize_tuple-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
988 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
989 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTuple" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTuple">SerializeTuple</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_tuple_struct-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#124-128">source</a><a href="#method.serialize_tuple_struct-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
991 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
992 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
993 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_tuple_variant-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#132-138">source</a><a href="#method.serialize_tuple_variant-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
995 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
996 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
997 _variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
998 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
999 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_map-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#142">source</a><a href="#method.serialize_map-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_map" class="fn">serialize_map</a>(
1001 _len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
1002 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeMap" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeMap">SerializeMap</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_struct-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#146-150">source</a><a href="#method.serialize_struct-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct" class="fn">serialize_struct</a>(
1004 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1005 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1006 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStruct">SerializeStruct</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.serialize_struct_variant-1" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#154-160">source</a><a href="#method.serialize_struct_variant-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
1008 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1009 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
1010 _variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1011 _len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1012 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'a> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStructVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStructVariant">SerializeStructVariant</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>></h4></section><section id="method.collect_str-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde/1.0.214/src/serde/ser/fmt.rs.html#164-166">source</a><a href="#method.collect_str-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.collect_str" class="fn">collect_str</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html" title="struct core::fmt::Error">Error</a>><div class="where">where
1013 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>,</div></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Serializer-for-%26mut+Serializer%3CW,+F%3E" class="impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#61-64">source</a><a href="#impl-Serializer-for-%26mut+Serializer%3CW,+F%3E" class="anchor">§</a><h3 class="code-header">impl<'a, W, F> <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a> for &'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F><div class="where">where
1014 W: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,
1015 F: <a class="trait" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/trait.Formatter.html" title="trait serde_json::ser::Formatter">Formatter</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.serialize_newtype_struct-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#223-225">source</a><a href="#method.serialize_newtype_struct-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_struct" class="fn">serialize_newtype_struct</a><T>(
1017 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1018 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
1019 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
1020 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Serialize newtypes without an object wrapper.</p>
1021 </div></details><section id="associatedtype.Ok-3" class="associatedtype trait-impl"><a href="#associatedtype.Ok-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Ok" class="associatedtype">Ok</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a></h4></section><section id="associatedtype.SerializeSeq-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeSeq-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeSeq" class="associatedtype">SerializeSeq</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeTuple-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTuple-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTuple" class="associatedtype">SerializeTuple</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeTupleStruct-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleStruct-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleStruct" class="associatedtype">SerializeTupleStruct</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeTupleVariant-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeTupleVariant-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeTupleVariant" class="associatedtype">SerializeTupleVariant</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeMap-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeMap-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeMap" class="associatedtype">SerializeMap</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeStruct-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStruct-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStruct" class="associatedtype">SerializeStruct</a> = Compound<'a, W, F></h4></section><section id="associatedtype.SerializeStructVariant-3" class="associatedtype trait-impl"><a href="#associatedtype.SerializeStructVariant-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.SerializeStructVariant" class="associatedtype">SerializeStructVariant</a> = Compound<'a, W, F></h4></section><section id="method.serialize_bool-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#78">source</a><a href="#method.serialize_bool-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bool" class="fn">serialize_bool</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i8-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#85">source</a><a href="#method.serialize_i8-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i8" class="fn">serialize_i8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i16-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#92">source</a><a href="#method.serialize_i16-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i16" class="fn">serialize_i16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i32-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#99">source</a><a href="#method.serialize_i32-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i32" class="fn">serialize_i32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i64-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#106">source</a><a href="#method.serialize_i64-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_i64" class="fn">serialize_i64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_i128-3" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#112">source</a><a href="#method.serialize_i128-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_i128" class="fn">serialize_i128</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u8-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#119">source</a><a href="#method.serialize_u8-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u8" class="fn">serialize_u8</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u16-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#126">source</a><a href="#method.serialize_u16-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u16" class="fn">serialize_u16</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u32-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#133">source</a><a href="#method.serialize_u32-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u32" class="fn">serialize_u32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u64-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#140">source</a><a href="#method.serialize_u64-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_u64" class="fn">serialize_u64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_u128-3" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#146">source</a><a href="#method.serialize_u128-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.serialize_u128" class="fn">serialize_u128</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_f32-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#153">source</a><a href="#method.serialize_f32-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f32" class="fn">serialize_f32</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_f64-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#167">source</a><a href="#method.serialize_f64-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_f64" class="fn">serialize_f64</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_char-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#181">source</a><a href="#method.serialize_char-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_char" class="fn">serialize_char</a>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_str-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#188">source</a><a href="#method.serialize_str-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_str" class="fn">serialize_str</a>(self, value: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_bytes-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#193">source</a><a href="#method.serialize_bytes-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_bytes" class="fn">serialize_bytes</a>(self, value: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#200">source</a><a href="#method.serialize_unit-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit" class="fn">serialize_unit</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit_struct-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#207">source</a><a href="#method.serialize_unit_struct-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_struct" class="fn">serialize_unit_struct</a>(self, _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_unit_variant-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#212-217">source</a><a href="#method.serialize_unit_variant-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_unit_variant" class="fn">serialize_unit_variant</a>(
1023 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1024 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
1025 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>
1026 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_newtype_variant-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#231-239">source</a><a href="#method.serialize_newtype_variant-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_newtype_variant" class="fn">serialize_newtype_variant</a><T>(
1028 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1029 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
1030 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1031 value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>
1032 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
1033 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_none-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#269">source</a><a href="#method.serialize_none-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_none" class="fn">serialize_none</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_some-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#274-276">source</a><a href="#method.serialize_some-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_some" class="fn">serialize_some</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
1034 T: <a class="trait" href="../trait.Serialize.html" title="trait bdk_chain::bitcoin::hashes::serde::Serialize">Serialize</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section><section id="method.serialize_seq-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#282">source</a><a href="#method.serialize_seq-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_seq" class="fn">serialize_seq</a>(
1036 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
1037 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeSeq" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeSeq">SerializeSeq</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#305">source</a><a href="#method.serialize_tuple-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple" class="fn">serialize_tuple</a>(
1039 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1040 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTuple" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTuple">SerializeTuple</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple_struct-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#310-314">source</a><a href="#method.serialize_tuple_struct-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_struct" class="fn">serialize_tuple_struct</a>(
1042 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1043 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1044 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleStruct">SerializeTupleStruct</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_tuple_variant-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#319-325">source</a><a href="#method.serialize_tuple_variant-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_tuple_variant" class="fn">serialize_tuple_variant</a>(
1046 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1047 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
1048 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1049 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1050 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeTupleVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeTupleVariant">SerializeTupleVariant</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_map-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#347">source</a><a href="#method.serialize_map-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_map" class="fn">serialize_map</a>(
1052 len: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>
1053 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeMap" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeMap">SerializeMap</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_struct-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#370">source</a><a href="#method.serialize_struct-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct" class="fn">serialize_struct</a>(
1055 name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1056 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1057 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStruct" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStruct">SerializeStruct</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.serialize_struct_variant-2" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#381-387">source</a><a href="#method.serialize_struct_variant-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.serialize_struct_variant" class="fn">serialize_struct_variant</a>(
1059 _name: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1060 _variant_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
1061 variant: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
1062 len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>
1063 ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<&'a mut <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/ser/struct.Serializer.html" title="struct serde_json::ser::Serializer">Serializer</a><W, F> as <a class="trait" href="../trait.Serializer.html" title="trait bdk_chain::bitcoin::hashes::serde::Serializer">Serializer</a>>::<a class="associatedtype" href="../trait.Serializer.html#associatedtype.SerializeStructVariant" title="type bdk_chain::bitcoin::hashes::serde::Serializer::SerializeStructVariant">SerializeStructVariant</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>></h4></section><section id="method.collect_str-3" class="method trait-impl"><a class="src rightside" href="https://docs.rs/serde_json/1.0.132/src/serde_json/ser.rs.html#408-410">source</a><a href="#method.collect_str-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.collect_str" class="fn">collect_str</a><T>(self, value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/serde_json/1.0.132/serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a>><div class="where">where
1064 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>,</div></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../../../trait.impl/serde/ser/trait.Serializer.js" data-ignore-extern-crates="serde_json,core" async></script></section></div></main></body></html>