<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `ByteBuf` struct in crate `serde_bytes`."><metaname="keywords"content="rust, rustlang, rust-lang, ByteBuf"><title>serde_bytes::ByteBuf - Rust</title><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../dark.css"><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptsrc="../storage.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="shortcut icon"href="../favicon.ico"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../serde_bytes/index.html'><divclass='logo-container'><imgsrc='../rust-logo.png'alt='logo'></div></a><pclass='location'>Struct ByteBuf</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.from">from</a><ahref="#method.into_boxed_bytes">into_boxed_bytes</a><ahref="#method.into_vec">into_vec</a><ahref="#method.new">new</a><ahref="#method.with_capacity">with_capacity</a></div><aclass="sidebar-title"href="#deref-methods">Methods from Deref<Target=Vec<u8>></a><divclass="sidebar-links"><ahref="#method.append">append</a><ahref="#method.as_mut_ptr">as_mut_ptr</a><ahref="#method.as_mut_slice">as_mut_slice</a><ahref="#method.as_ptr">as_ptr</a><ahref="#method.as_slice">as_slice</a><ahref="#method.capacity">capacity</a><ahref="#method.clear">clear</a><ahref="#method.dedup">dedup</a><ahref="#method.dedup_by">dedup_by</a><ahref="#method.dedup_by_key">dedup_by_key</a><ahref="#method.drain">drain</a><ahref="#method.drain_filter">drain_filter</a><ahref="#method.extend_from_slice">extend_from_slice</a><ahref="#method.insert">insert</a><ahref="#method.is_empty">is_empty</a><ahref="#method.len">len</a><ahref="#method.pop">pop</a><ahref="#method.push">push</a><ahref="#method.remove">remove</a><ahref="#method.remove_item">remove_item</a><ahref="#method.reserve">reserve</a><ahref="#method.reserve_exact">reserve_exact</a><ahref="#method.resize">resize</a><ahref="#method.resize_default">resize_default</a><ahref="#method.resize_with">resize_with</a><ahref="#method.retain">retain</a><ahref="#method.set_len">set_len</a><ahref="#method.shrink_to">shrink_to</a><ahref="#method.shrink_to_fit">shrink_to_fit</a><ahref="#method.splice">splice</a><ahref="#method.split_off">split_off</a><ahref="#method.swap_remove">swap_remove</a><ahref="#method.truncate">truncate</a><ahref="#method.try_reserve">try_reserve</a><ahref="#method.try_reserve_exact">try_reserve_exact</a></div><aclass="sidebar-title"href="#implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-AsMut%3C%5Bu8%5D%3E">AsMut<[u8]></a><ahref="#impl-AsRef%3C%5Bu8%5D%3E">AsRef<[u8]></a><ahref="#impl-Borrow%3CBytes%3E">Borrow<Bytes></a><ahref="#impl-BorrowMut%3CBytes%3E">BorrowMut<Bytes></a><ahref="#impl-Clone">Clone</a><ahref="#impl-Debug">Debug</a><ahref="#impl-Default">Default</a><ahref="#impl-Deref">Deref</a><ahref="#impl-DerefMut">DerefMut</a><ahref="#impl-Deserialize%3C%27de%3E">Deserialize<'de></a><ahref="#impl-Eq">Eq</a><ahref="#impl-Hash">Hash</a><ahref="#impl-IntoIterator">IntoIterator</a><ahref="#impl-Ord">Ord</a><ahref="#impl-PartialEq%3CRhs%3E">PartialEq<Rhs></a><ahref="#impl-PartialOrd%3CRhs%3E">PartialOrd<Rhs></a><ahref="#impl-Serialize">Serialize</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Imp
</div><h4id='method.with_capacity'class="method"><codeid='with_capacity.v'>pub fn <ahref='#method.with_capacity'class='fnname'>with_capacity</a>(cap: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#55-57'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Construct a new, empty <code>ByteBuf</code> with the specified capacity.</p>
</div><h4id='method.from'class="method"><codeid='from.v'>pub fn <ahref='#method.from'class='fnname'>from</a><T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>>>(bytes: T) -> Self</code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#60-64'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Wrap existing bytes in a <code>ByteBuf</code>.</p>
</div><h4id='method.into_vec'class="method"><codeid='into_vec.v'>pub fn <ahref='#method.into_vec'class='fnname'>into_vec</a>(self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#67-69'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Unwrap the vector of byte underlying this <code>ByteBuf</code>.</p>
</div><h4id='method.into_boxed_bytes'class="method"><codeid='into_boxed_bytes.v'>pub fn <ahref='#method.into_boxed_bytes'class='fnname'>into_boxed_bytes</a>(self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"title="struct alloc::boxed::Box">Box</a><<aclass="struct"href="../serde_bytes/struct.Bytes.html"title="struct serde_bytes::Bytes">Bytes</a>></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#72-74'title='goto source code'>[src]</a></h4></div><h2id='deref-methods'class='small-section-header'>Methods from <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html"title="trait core::ops::deref::Deref">Deref</a><Target = <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>><ahref='#deref-methods'class='anchor'></a></h2><divclass='impl-items'><h4id='method.capacity'class="method"><codeid='capacity.v'>pub fn <ahref='#method.capacity'class='fnname'>capacity</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#436-438'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns the number of elements the vector can hold without
</div><h4id='method.reserve'class="method"><codeid='reserve.v'>pub fn <ahref='#method.reserve'class='fnname'>reserve</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#458-460'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Reserves capacity for at least <code>additional</code> more elements to be inserted
in the given <code>Vec<T></code>. The collection may reserve more space to avoid
frequent reallocations. After calling <code>reserve</code>, capacity will be
greater than or equal to <code>self.len() + additional</code>. Does nothing if
</div><h4id='method.reserve_exact'class="method"><codeid='reserve_exact.v'>pub fn <ahref='#method.reserve_exact'class='fnname'>reserve_exact</a>(&mut self, additional: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#483-485'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Reserves the minimum capacity for exactly <code>additional</code> more elements to
be inserted in the given <code>Vec<T></code>. After calling <code>reserve_exact</code>,
capacity will be greater than or equal to <code>self.len() + additional</code>.
Does nothing if the capacity is already sufficient.</p>
<p>Note that the allocator may give the collection more space than it
requests. Therefore, capacity can not be relied upon to be precisely
minimal. Prefer <code>reserve</code> if future insertions are expected.</p>
<spanclass="ident">val</span><spanclass="op">*</span><spanclass="number">2</span><spanclass="op">+</span><spanclass="number">5</span><spanclass="comment">// very complicated</span>
<spanclass="ident">val</span><spanclass="op">*</span><spanclass="number">2</span><spanclass="op">+</span><spanclass="number">5</span><spanclass="comment">// very complicated</span>
</div><h4id='method.shrink_to_fit'class="method"><codeid='shrink_to_fit.v'>pub fn <ahref='#method.shrink_to_fit'class='fnname'>shrink_to_fit</a>(&mut self)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#579-583'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Shrinks the capacity of the vector as much as possible.</p>
<p>It will drop down as close as possible to the length but the allocator
may still inform the vector that there is space for a few more elements.</p>
</div><h4id='method.truncate'class="method"><codeid='truncate.v'>pub fn <ahref='#method.truncate'class='fnname'>truncate</a>(&mut self, len: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#687-704'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Shortens the vector, keeping the first <code>len</code> elements and dropping
the rest.</p>
<p>If <code>len</code> is greater than the vector's current length, this has no
effect.</p>
<p>The <ahref="#method.drain"><code>drain</code></a> method can emulate <code>truncate</code>, but causes the excess
elements to be returned instead of dropped.</p>
<p>Note that this method has no effect on the allocated capacity
</div><h4id='method.as_slice'class="method"><codeid='as_slice.v'>pub fn <ahref='#method.as_slice'class='fnname'>as_slice</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[T]</a></code><spanclass='since'title='Stable since Rust version 1.7.0'>1.7.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#719-721'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Extracts a slice containing the entire vector.</p>
</div><h4id='method.as_mut_slice'class="method"><codeid='as_mut_slice.v'>pub fn <ahref='#method.as_mut_slice'class='fnname'>as_mut_slice</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [T]</a></code><spanclass='since'title='Stable since Rust version 1.7.0'>1.7.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#736-738'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Extracts a mutable slice of the entire vector.</p>
</div><h4id='method.as_ptr'class="method"><codeid='as_ptr.v'>pub fn <ahref='#method.as_ptr'class='fnname'>as_ptr</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const T</a></code><spanclass='since'title='Stable since Rust version 1.37.0'>1.37.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#767-773'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns a raw pointer to the vector's buffer.</p>
<p>The caller must ensure that the vector outlives the pointer this
function returns, or else it will end up pointing to garbage.
Modifying the vector may cause its buffer to be reallocated,
which would also make any pointers to it invalid.</p>
<p>The caller must also ensure that the memory the pointer (non-transitively) points to
is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer
derived from it. If you need to mutate the contents of the slice, use <ahref="#method.as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
</div><h4id='method.as_mut_ptr'class="method"><codeid='as_mut_ptr.v'>pub fn <ahref='#method.as_mut_ptr'class='fnname'>as_mut_ptr</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut T</a></code><spanclass='since'title='Stable since Rust version 1.37.0'>1.37.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#801-807'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns an unsafe mutable pointer to the vector's buffer.</p>
<p>The caller must ensure that the vector outlives the pointer this
function returns, or else it will end up pointing to garbage.
Modifying the vector may cause its buffer to be reallocated,
which would also make any pointers to it invalid.</p>
</div><h4id='method.set_len'class="method"><codeid='set_len.v'>pub unsafe fn <ahref='#method.set_len'class='fnname'>set_len</a>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#889-893'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Forces the length of the vector to <code>new_len</code>.</p>
<p>This is a low-level operation that maintains none of the normal
invariants of the type. Normally changing the length of a vector
is done using one of the safe operations instead, such as
<ahref="#method.truncate"><code>truncate</code></a>, <ahref="#method.resize"><code>resize</code></a>, <ahref="#method.extend-1"><code>extend</code></a>, or <ahref="#method.clear"><code>clear</code></a>.</p>
<p>Normally, here, one would use <ahref="#method.clear"><code>clear</code></a> instead to correctly drop
the contents and thus not leak memory.</p>
</div><h4id='method.swap_remove'class="method"><codeid='swap_remove.v'>pub fn <ahref='#method.swap_remove'class='fnname'>swap_remove</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> T</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#918-928'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes an element from the vector and returns it.</p>
<p>The removed element is replaced by the last element of the vector.</p>
<p>This does not preserve ordering, but is O(1).</p>
</div><h4id='method.insert'class="method"><codeid='insert.v'>pub fn <ahref='#method.insert'class='fnname'>insert</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, element: T)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#947-970'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Inserts an element at position <code>index</code> within the vector, shifting all
</div><h4id='method.remove'class="method"><codeid='remove.v'>pub fn <ahref='#method.remove'class='fnname'>remove</a>(&mut self, index: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> T</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#987-1006'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes and returns the element at position <code>index</code> within the vector,
</div><h4id='method.retain'class="method"><codeid='retain.v'>pub fn <ahref='#method.retain'class='fnname'>retain</a><F>(&mut self, f: F) <spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1032-1036'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Retains only the elements specified by the predicate.</p>
<p>In other words, remove all elements <code>e</code> such that <code>f(&e)</code> returns <code>false</code>.
This method operates in place, visiting each element exactly once in the
original order, and preserves the order of the retained elements.</p>
</div><h4id='method.dedup_by_key'class="method"><codeid='dedup_by_key.v'>pub fn <ahref='#method.dedup_by_key'class='fnname'>dedup_by_key</a><F, K>(&mut self, key: F) <spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T) -> K,<br> K: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><K>, </span></code><spanclass='since'title='Stable since Rust version 1.16.0'>1.16.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1054-1056'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes all but the first of consecutive elements in the vector that resolve to the same
key.</p>
<p>If the vector is sorted, this removes all duplicates.</p>
</div><h4id='method.dedup_by'class="method"><codeid='dedup_by.v'>pub fn <ahref='#method.dedup_by'class='fnname'>dedup_by</a><F>(&mut self, same_bucket: F) <spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>(<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code><spanclass='since'title='Stable since Rust version 1.16.0'>1.16.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1077-1083'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes all but the first of consecutive elements in the vector satisfying a given equality
relation.</p>
<p>The <code>same_bucket</code> function is passed references to two elements from the vector and
must determine if the elements compare equal. The elements are passed in opposite order
from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is removed.</p>
<p>If the vector is sorted, this removes all duplicates.</p>
</div><h4id='method.push'class="method"><codeid='push.v'>pub fn <ahref='#method.push'class='fnname'>push</a>(&mut self, value: T)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1100-1111'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Appends an element to the back of a collection.</p>
</div><h4id='method.pop'class="method"><codeid='pop.v'>pub fn <ahref='#method.pop'class='fnname'>pop</a>(&mut self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><T></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1127-1136'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes the last element from a vector and returns it, or <ahref="../../std/option/enum.Option.html#variant.None"><code>None</code></a> if it
</div><h4id='method.append'class="method"><codeid='append.v'>pub fn <ahref='#method.append'class='fnname'>append</a>(&mut self, other: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><T>)</code><spanclass='since'title='Stable since Rust version 1.4.0'>1.4.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1155-1160'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Moves all the elements of <code>other</code> into <code>Self</code>, leaving <code>other</code> empty.</p>
</div><h4id='method.drain'class="method"><codeid='drain.v'>pub fn <ahref='#method.drain'class='fnname'>drain</a><R>(&mut self, range: R) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Drain.html"title="struct alloc::vec::Drain">Drain</a><T><spanclass="where fmt-newline">where<br> R: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, </span></code><spanclass='since'title='Stable since Rust version 1.6.0'>1.6.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1199-1240'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a draining iterator that removes the specified range in the vector
and yields the removed items.</p>
<p>Note 1: The element range is removed even if the iterator is only
partially consumed or not consumed at all.</p>
<p>Note 2: It is unspecified how many elements are removed from the vector
</div><h4id='method.clear'class="method"><codeid='clear.v'>pub fn <ahref='#method.clear'class='fnname'>clear</a>(&mut self)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1258-1260'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Clears the vector, removing all values.</p>
<p>Note that this method has no effect on the allocated capacity
</div><h4id='method.len'class="method"><codeid='len.v'>pub fn <ahref='#method.len'class='fnname'>len</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1273-1275'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns the number of elements in the vector, also referred to
</div><h4id='method.is_empty'class="method"><codeid='is_empty.v'>pub fn <ahref='#method.is_empty'class='fnname'>is_empty</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1289-1291'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if the vector contains no elements.</p>
</div><h4id='method.split_off'class="method"><codeid='split_off.v'>pub fn <ahref='#method.split_off'class='fnname'>split_off</a>(&mut self, at: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><T></code><spanclass='since'title='Stable since Rust version 1.4.0'>1.4.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1314-1330'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Splits the collection into two at the given index.</p>
<p>Returns a newly allocated <code>Self</code>. <code>self</code> contains elements <code>[0, at)</code>,
and the returned <code>Self</code> contains elements <code>[at, len)</code>.</p>
<p>Note that the capacity of <code>self</code> does not change.</p>
</div><h4id='method.resize_with'class="method"><codeid='resize_with.v'>pub fn <ahref='#method.resize_with'class='fnname'>resize_with</a><F>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, f: F) <spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>() -> T, </span></code><spanclass='since'title='Stable since Rust version 1.33.0'>1.33.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1362-1371'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Resizes the <code>Vec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p>
<p>If <code>new_len</code> is greater than <code>len</code>, the <code>Vec</code> is extended by the
difference, with each additional slot filled with the result of
calling the closure <code>f</code>. The return values from <code>f</code> will end up
in the <code>Vec</code> in the order they have been generated.</p>
<p>If <code>new_len</code> is less than <code>len</code>, the <code>Vec</code> is simply truncated.</p>
<p>This method uses a closure to create new values on every push. If
you'd rather <ahref="../../std/clone/trait.Clone.html"><code>Clone</code></a> a given value, use <ahref="#method.resize"><code>resize</code></a>. If you want
to use the <ahref="https://doc.rust-lang.org/nightly/core/default/trait.Default.html"title="`Default`"><code>Default</code></a> trait to generate values, you can pass
<ahref="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default"title="`Default::default()`"><code>Default::default()</code></a> as the second argument.</p>
</div></div><divclass='impl-items'><h4id='method.resize'class="method"><codeid='resize.v'>pub fn <ahref='#method.resize'class='fnname'>resize</a>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, value: T)</code><spanclass='since'title='Stable since Rust version 1.5.0'>1.5.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1435-1443'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Resizes the <code>Vec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p>
<p>If <code>new_len</code> is greater than <code>len</code>, the <code>Vec</code> is extended by the
difference, with each additional slot filled with <code>value</code>.
If <code>new_len</code> is less than <code>len</code>, the <code>Vec</code> is simply truncated.</p>
<p>This method requires <ahref="../../std/clone/trait.Clone.html"><code>Clone</code></a> to be able clone the passed value. If
you need more flexibility (or want to rely on <ahref="../../std/default/trait.Default.html"><code>Default</code></a> instead of
<ahref="../../std/clone/trait.Clone.html"><code>Clone</code></a>), use <ahref="#method.resize_with"><code>resize_with</code></a>.</p>
</div><h4id='method.extend_from_slice'class="method"><codeid='extend_from_slice.v'>pub fn <ahref='#method.extend_from_slice'class='fnname'>extend_from_slice</a>(&mut self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[T]</a>)</code><spanclass='since'title='Stable since Rust version 1.6.0'>1.6.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1465-1467'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Clones and appends all elements in a slice to the <code>Vec</code>.</p>
<p>Iterates over the slice <code>other</code>, clones each element, and then appends
it to this <code>Vec</code>. The <code>other</code> vector is traversed in-order.</p>
<p>Note that this function is same as <ahref="#method.extend"><code>extend</code></a> except that it is
specialized to work with slices instead. If and when Rust gets
specialization this function will likely be deprecated (but still
</div></div><divclass='impl-items'><h4id='method.resize_default'class="method"><codeid='resize_default.v'>pub fn <ahref='#method.resize_default'class='fnname'>resize_default</a>(&mut self, new_len: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1503-1511'title='goto source code'>[src]</a></h4><divclass='stability'><divclass='stab deprecated'>Deprecated since 1.33.0: <p>This is moving towards being removed in favor of <code>.resize_with(Default::default)</code>. If you disagree, please comment in the tracking issue.</p>
</div><divclass='stab unstable'><spanclass='emoji'>🔬</span> This is a nightly-only experimental API. (<code>vec_resize_default</code>)</div></div><divclass='docblock'><p>Resizes the <code>Vec</code> in-place so that <code>len</code> is equal to <code>new_len</code>.</p>
<p>If <code>new_len</code> is greater than <code>len</code>, the <code>Vec</code> is extended by the
difference, with each additional slot filled with <ahref="../../std/default/trait.Default.html#tymethod.default"><code>Default::default()</code></a>.
If <code>new_len</code> is less than <code>len</code>, the <code>Vec</code> is simply truncated.</p>
<p>This method uses <ahref="../../std/default/trait.Default.html"><code>Default</code></a> to create new values on every push. If
you'd rather <ahref="../../std/clone/trait.Clone.html"><code>Clone</code></a> a given value, use <ahref="#method.resize"><code>resize</code></a>.</p>
</div></div><divclass='impl-items'><h4id='method.dedup'class="method"><codeid='dedup.v'>pub fn <ahref='#method.dedup'class='fnname'>dedup</a>(&mut self)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#1620-1622'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Removes consecutive repeated elements in the vector according to the
</div></div><divclass='impl-items'><h4id='method.splice'class="method"><codeid='splice.v'>pub fn <ahref='#method.splice'class='fnname'>splice</a><R, I>(<br> &mut self, <br> range: R, <br> replace_with: I<br>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Splice.html"title="struct alloc::vec::Splice">Splice</a><<I as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a>><spanclass="where fmt-newline">where<br> I: <aclass="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 = T>,<br> R: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/range/trait.RangeBounds.html"title="trait core::ops::range::RangeBounds">RangeBounds</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>, </span></code><spanclass='since'title='Stable since Rust version 1.21.0'>1.21.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/vec.rs.html#2088-2095'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a splicing iterator that replaces the specified range in the vector
with the given <code>replace_with</code> iterator and yields the removed items.
<code>replace_with</code> does not need to be the same length as <code>range</code>.</p>
<p>The element range is removed even if the iterator is not consumed until the end.</p>
<p>It is unspecified how many elements are removed from the vector
if the <code>Splice</code> value is leaked.</p>
<p>The input iterator <code>replace_with</code> is only consumed when the <code>Splice</code> value is dropped.</p>
<p>This is optimal if:</p>
<ul>
<li>The tail (elements in the vector after <code>range</code>) is empty,</li>
<li>or <code>replace_with</code> yields fewer elements than <code>range</code>’s length</li>
<li>or the lower bound of its <code>size_hint()</code> is exact.</li>
</ul>
<p>Otherwise, a temporary vector is allocated and the tail is moved twice.</p>
</span>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt'class='fnname'>lt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#793-798'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</span>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le'class='fnname'>le</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#815-820'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</span>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt'class='fnname'>gt</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#836-841'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</span>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge'class='fnname'>ge</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#858-863'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3id='impl-Ord'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Ord'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#43'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.cmp'class="method hidden"><codeid='cmp.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp'class='fnname'>cmp</a>(&self, other: &<aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#43'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4id='method.max'class="method hidden"><codeid='max.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max'class='fnname'>max</a>(self, other: Self) -> Self</code><spanclass='since'title='Stable since Rust version 1.21.0'>1.21.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#563-566'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4id='method.min'class="method hidden"><codeid='min.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min'class='fnname'>min</a>(self, other: Self) -> Self</code><spanclass='since'title='Stable since Rust version 1.21.0'>1.21.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#580-583'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div><h4id='method.clamp'class="method hidden"><codeid='clamp.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp'class='fnname'>clamp</a>(self, min: Self, max: Self) -> Self</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#604-614'title='goto source code'>[src]</a></h4><divclass='stability hidden'><divclass='stab unstable'><spanclass='emoji'>🔬</span> This is a nightly-only experimental API. (<code>clamp</code>)</div></div><divclass='docblock hidden'><p>Restrict a value to a certain interval. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></p>
</div></div><h3id='impl-PartialEq%3CRhs%3E'class='impl'><codeclass='in-band'>impl<Rhs: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>><aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><Rhs> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a><spanclass="where fmt-newline">where<br> Rhs: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><ahref='#impl-PartialEq%3CRhs%3E'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#133-140'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.eq'class="method hidden"><codeid='eq.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#137-139'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></div><h3id='impl-IntoIterator'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-IntoIterator'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#157-164'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Item'class="type"><codeid='Item.t'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item'class="type">Item</a> = <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><divclass='docblock'><p>The type of the elements being iterated over.</p>
</div><h4id='associatedtype.IntoIter'class="type"><codeid='IntoIter.t'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter'class="type">IntoIter</a> = <<aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code></h4><divclass='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4id='method.into_iter'class="method hidden"><codeid='into_iter.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter'class='fnname'>into_iter</a>(self) -> Self::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#161-163'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3id='impl-IntoIterator-1'class='impl'><codeclass='in-band'>impl<'a><aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-IntoIterator-1'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#166-173'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Item-1'class="type"><codeid='Item.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item'class="type">Item</a> = &'a <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><divclass='docblock'><p>The type of the elements being iterated over.</p>
</div><h4id='associatedtype.IntoIter-1'class="type"><codeid='IntoIter.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter'class="type">IntoIter</a> = <<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a> as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code></h4><divclass='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4id='method.into_iter-1'class="method hidden"><codeid='into_iter.v-1'>fn <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter'class='fnname'>into_iter</a>(self) -> Self::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#170-172'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3id='impl-IntoIterator-2'class='impl'><codeclass='in-band'>impl<'a><aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a mut <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-IntoIterator-2'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#175-182'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Item-2'class="type"><codeid='Item.t-2'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item'class="type">Item</a> = &'a mut <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></h4><divclass='docblock'><p>The type of the elements being iterated over.</p>
</div><h4id='associatedtype.IntoIter-2'class="type"><codeid='IntoIter.t-2'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter'class="type">IntoIter</a> = <<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a> as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code></h4><divclass='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4id='method.into_iter-2'class="method hidden"><codeid='into_iter.v-2'>fn <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter'class='fnname'>into_iter</a>(self) -> Self::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter"title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#179-181'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3id='impl-DerefMut'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html"title="trait core::ops::deref::DerefMut">DerefMut</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-DerefMut'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#115-119'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.deref_mut'class="method hidden"><codeid='deref_mut.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut'class='fnname'>deref_mut</a>(&mut self) ->&mut Self::<aclass="type"href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target"title="type core::ops::deref::Deref::Target">Target</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#116-118'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably dereferences the value.</p>
</div></div><h3id='impl-Hash'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Hash'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#151-155'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.hash'class="method hidden"><codeid='hash.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash'class='fnname'>hash</a><H: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>>(&self, state: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H)</code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#152-154'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Feeds this value into the given [<code>Hasher</code>]. <ahref="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4id='method.hash_slice'class="method hidden"><codeid='hash_slice.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice'class='fnname'>hash_slice</a><H>(data: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <spanclass="where fmt-newline">where<br> H: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>, </span></code><spanclass='since'title='Stable since Rust version 1.3.0'>1.3.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#192-198'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <ahref="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3id='impl-Debug'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Debug'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#89-93'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.fmt'class="method hidden"><codeid='fmt.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt'class='fnname'>fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a>) -><aclass="type"href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#90-92'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3id='impl-BorrowMut%3CBytes%3E'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><<aclass="struct"href="../serde_bytes/struct.Bytes.html"title="struct serde_bytes::Bytes">Bytes</a>> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-BorrowMut%3CBytes%3E'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#127-131'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow_mut'class="method hidden"><codeid='borrow_mut.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut'class='fnname'>borrow_mut</a>(&mut self) ->&mut <aclass="struct"href="../serde_bytes/struct.Bytes.html"title="struct serde_bytes::Bytes">Bytes</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#128-130'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id='impl-Borrow%3CBytes%3E'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><<aclass="struct"href="../serde_bytes/struct.Bytes.html"title="struct serde_bytes::Bytes">Bytes</a>> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Borrow%3CBytes%3E'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#121-125'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow'class="method hidden"><codeid='borrow.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow'class='fnname'>borrow</a>(&self) ->&<aclass="struct"href="../serde_bytes/struct.Bytes.html"title="struct serde_bytes::Bytes">Bytes</a></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#122-124'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id='impl-Serialize-1'class='impl'><codeclass='in-band'>impl <aclass="trait"href="../serde/ser/trait.Serialize.html"title="trait serde::ser::Serialize">Serialize</a> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Serialize-1'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#184-191'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.serialize-1'class="method hidden"><codeid='serialize.v-1'>fn <ahref='../serde/ser/trait.Serialize.html#tymethod.serialize'class='fnname'>serialize</a><S>(&self, serializer: S) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><S::<aclass="type"href="../serde/ser/trait.Serializer.html#associatedtype.Ok"title="type serde::ser::Serializer::Ok">Ok</a>, S::<aclass="type"href="../serde/ser/trait.Serializer.html#associatedtype.Error"title="type serde::ser::Serializer::Error">Error</a>><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="../serde/ser/trait.Serializer.html"title="trait serde::ser::Serializer">Serializer</a>, </span></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#185-190'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Serialize this value into the given Serde serializer. <ahref="../serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3id='impl-Deserialize%3C%27de%3E-1'class='impl'><codeclass='in-band'>impl<'de><aclass="trait"href="../serde/de/trait.Deserialize.html"title="trait serde::de::Deserialize">Deserialize</a><'de> for <aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a></code><ahref='#impl-Deserialize%3C%27de%3E-1'class='anchor'></a><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#245-252'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.deserialize-1'class="method hidden"><codeid='deserialize.v-1'>fn <ahref='../serde/de/trait.Deserialize.html#tymethod.deserialize'class='fnname'>deserialize</a><D>(deserializer: D) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../serde_bytes/struct.ByteBuf.html"title="struct serde_bytes::ByteBuf">ByteBuf</a>, D::<aclass="type"href="../serde/de/trait.Deserializer.html#associatedtype.Error"title="type serde::de::Deserializer::Error">Error</a>><spanclass="where fmt-newline">where<br> D: <aclass="trait"href="../serde/de/trait.Deserializer.html"title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></code><aclass='srclink'href='../src/serde_bytes/bytebuf.rs.html#246-251'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <ahref="../serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3id='impl-IntoIterator-3'class='impl'><codeclass='in-band'>impl<I><aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for I <spanclass="where fmt-newline">where<br> I: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a>, </span></code><ahref='#impl-IntoIterator-3'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#242-249'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Item-3'class="type"><codeid='Item.t-3'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item'class="type">Item</a> = <I as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item"title="type core::iter::traits::iterator::Iterator::Item">Item</a></code></h4><divclass='docblock'><p>The type of the elements being iterated over.</p>
</div><h4id='associatedtype.IntoIter-3'class="type"><codeid='IntoIter.t-3'>type <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter'class="type">IntoIter</a> = I</code></h4><divclass='docblock'><p>Which kind of iterator are we turning this into?</p>
</div><h4id='method.into_iter-3'class="method hidden"><codeid='into_iter.v-3'>fn <ahref='https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter'class='fnname'>into_iter</a>(self) -> I</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/iter/traits/collect.rs.html#246-248'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates an iterator from a value. <ahref="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></p>
</div></div><h3id='impl-ToOwned'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>, </span></code><ahref='#impl-ToOwned'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Owned'class="type"><codeid='Owned.t'>type <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned'class="type">Owned</a> = T</code></h4><divclass='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4id='method.to_owned'class="method hidden"><codeid='to_owned.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned'class='fnname'>to_owned</a>(&self) -> T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4id='method.clone_into'class="method hidden"><codeid='clone_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into'class='fnname'>clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91'title='goto source code'>[src]</a></h4><divclass='stability hidden'><divclass='stab unstable'><details><summary><spanclass='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><divclass='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3id='impl-TryFrom%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref='#impl-TryFrom%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error'class="type"><codeid='Error.t'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error'class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_from'class="method hidden"><codeid='try_from.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from'class='fnname'>try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-TryInto%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref='#impl-TryInto%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error-1'class="type"><codeid='Error.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error'class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_into'class="method hidden"><codeid='try_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into'class='fnname'>try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-BorrowMut%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-BorrowMut%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow_mut-1'class="method hidden"><codeid='borrow_mut.v-1'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut'class='fnname'>borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id='impl-Borrow%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Borrow%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow-1'class="method hidden"><codeid='borrow.v-1'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow'class='fnname'>borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id='impl-Any'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T <spanclass="where fmt-newline">where<br> T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Any'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.type_id'class="method hidden"><codeid='type_id.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id'class='fnname'>type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3id='impl-DeserializeOwned'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="../serde/de/trait.DeserializeOwned.html"title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="../serde/de/trait.Deserialize.html"title="trait serde::de::Deserialize">Deserialize</a><'de>, </span></code><ahref='#impl-DeserializeOwned'class='anchor'></a><aclass='srclink'href='../src/serde/de/mod.rs.html#597'title='goto source code'>[src]</a></h3><divclass='impl-items'></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><divclass="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath="../";window.currentCrate="serde_bytes";</script><scriptsrc="../aliases.js"></script><scriptsrc="../main.js"></script><scriptdefersrc="../search-index.js"></script></body></html>