123 lines
52 KiB
HTML
123 lines
52 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Take` struct in crate `bytes`."><meta name="keywords" content="rust, rustlang, rust-lang, Take"><title>bytes::buf::Take - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../bytes/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Take</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.get_mut">get_mut</a><a href="#method.get_ref">get_ref</a><a href="#method.into_inner">into_inner</a><a href="#method.limit">limit</a><a href="#method.set_limit">set_limit</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Buf">Buf</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='../index.html'>bytes</a>::<wbr><a href='index.html'>buf</a></p><script>window.sidebarCurrent = {name: 'Take', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/bytes/buf/take.rs.html#10-13' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>bytes</a>::<wbr><a href='index.html'>buf</a>::<wbr><a class="struct" href=''>Take</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Take<T> { /* fields omitted */ }</pre></div><div class='docblock'><p>A <code>Buf</code> adapter which limits the bytes read from an underlying buffer.</p>
|
||
<p>This struct is generally created by calling <code>take()</code> on <code>Buf</code>. See
|
||
documentation of <a href="trait.Buf.html#method.take"><code>take()</code></a> for more details.</p>
|
||
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl<T> <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/bytes/buf/take.rs.html#22-138' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into_inner' class="method"><code id='into_inner.v'>pub fn <a href='#method.into_inner' class='fnname'>into_inner</a>(self) -> T</code><a class='srclink' href='../../src/bytes/buf/take.rs.html#43-45' title='goto source code'>[src]</a></h4><div class='docblock'><p>Consumes this <code>Take</code>, returning the underlying value.</p>
|
||
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b"hello world"</span>).<span class="ident">take</span>(<span class="number">2</span>);
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
|
||
|
||
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">dst</span>, <span class="string">b"he"</span>[..]);
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">buf</span>.<span class="ident">into_inner</span>();
|
||
|
||
<span class="ident">dst</span>.<span class="ident">clear</span>();
|
||
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">dst</span>, <span class="string">b"llo world"</span>[..]);</pre></div>
|
||
</div><h4 id='method.get_ref' class="method"><code id='get_ref.v'>pub fn <a href='#method.get_ref' class='fnname'>get_ref</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='../../src/bytes/buf/take.rs.html#61-63' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets a reference to the underlying <code>Buf</code>.</p>
|
||
<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
|
||
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b"hello world"</span>).<span class="ident">take</span>(<span class="number">2</span>);
|
||
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0</span>, <span class="ident">buf</span>.<span class="ident">get_ref</span>().<span class="ident">position</span>());</pre></div>
|
||
</div><h4 id='method.get_mut' class="method"><code id='get_mut.v'>pub fn <a href='#method.get_mut' class='fnname'>get_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='../../src/bytes/buf/take.rs.html#83-85' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets a mutable reference to the underlying <code>Buf</code>.</p>
|
||
<p>It is inadvisable to directly read from the underlying <code>Buf</code>.</p>
|
||
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b"hello world"</span>).<span class="ident">take</span>(<span class="number">2</span>);
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
|
||
|
||
<span class="ident">buf</span>.<span class="ident">get_mut</span>().<span class="ident">set_position</span>(<span class="number">2</span>);
|
||
|
||
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">dst</span>, <span class="string">b"ll"</span>[..]);</pre></div>
|
||
</div><h4 id='method.limit' class="method"><code id='limit.v'>pub fn <a href='#method.limit' class='fnname'>limit</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/bytes/buf/take.rs.html#106-108' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the maximum number of bytes that can be read.</p>
|
||
<h1 id="note" class="section-header"><a href="#note">Note</a></h1>
|
||
<p>If the inner <code>Buf</code> has fewer bytes than indicated by this method then
|
||
that is the actual number of available bytes.</p>
|
||
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bytes</span>::<span class="ident">Buf</span>;
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b"hello world"</span>).<span class="ident">take</span>(<span class="number">2</span>);
|
||
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">2</span>, <span class="ident">buf</span>.<span class="ident">limit</span>());
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="string">b'h'</span>, <span class="ident">buf</span>.<span class="ident">get_u8</span>());
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">1</span>, <span class="ident">buf</span>.<span class="ident">limit</span>());</pre></div>
|
||
</div><h4 id='method.set_limit' class="method"><code id='set_limit.v'>pub fn <a href='#method.set_limit' class='fnname'>set_limit</a>(&mut self, lim: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a class='srclink' href='../../src/bytes/buf/take.rs.html#135-137' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the maximum number of bytes that can be read.</p>
|
||
<h1 id="note-1" class="section-header"><a href="#note-1">Note</a></h1>
|
||
<p>If the inner <code>Buf</code> has fewer bytes than <code>lim</code> then that is the actual
|
||
number of available bytes.</p>
|
||
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">bytes</span>::{<span class="ident">Buf</span>, <span class="ident">BufMut</span>};
|
||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Cursor</span>;
|
||
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">buf</span> <span class="op">=</span> <span class="ident">Cursor</span>::<span class="ident">new</span>(<span class="string">b"hello world"</span>).<span class="ident">take</span>(<span class="number">2</span>);
|
||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">dst</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[];
|
||
|
||
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">dst</span>, <span class="string">b"he"</span>[..]);
|
||
|
||
<span class="ident">dst</span>.<span class="ident">clear</span>();
|
||
|
||
<span class="ident">buf</span>.<span class="ident">set_limit</span>(<span class="number">3</span>);
|
||
<span class="ident">dst</span>.<span class="ident">put</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">buf</span>);
|
||
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="kw-2">*</span><span class="ident">dst</span>, <span class="string">b"llo"</span>[..]);</pre></div>
|
||
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Buf' class='impl'><code class='in-band'>impl<T: <a class="trait" href="../../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a>> <a class="trait" href="../../bytes/buf/trait.Buf.html" title="trait bytes::buf::Buf">Buf</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T></code><a href='#impl-Buf' class='anchor'></a><a class='srclink' href='../../src/bytes/buf/take.rs.html#140-155' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.remaining' class="method hidden"><code id='remaining.v'>fn <a href='../../bytes/buf/trait.Buf.html#tymethod.remaining' class='fnname'>remaining</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/bytes/buf/take.rs.html#141-143' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the number of bytes between the current position and the end of the buffer. <a href="../../bytes/buf/trait.Buf.html#tymethod.remaining">Read more</a></p>
|
||
</div><h4 id='method.bytes' class="method hidden"><code id='bytes.v'>fn <a href='../../bytes/buf/trait.Buf.html#tymethod.bytes' class='fnname'>bytes</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../../src/bytes/buf/take.rs.html#145-148' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a slice starting at the current position and of length between 0 and <code>Buf::remaining()</code>. Note that this can return shorter slice (this allows non-continuous internal representation). <a href="../../bytes/buf/trait.Buf.html#tymethod.bytes">Read more</a></p>
|
||
</div><h4 id='method.advance' class="method hidden"><code id='advance.v'>fn <a href='../../bytes/buf/trait.Buf.html#tymethod.advance' class='fnname'>advance</a>(&mut self, cnt: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</code><a class='srclink' href='../../src/bytes/buf/take.rs.html#150-154' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Advance the internal cursor of the Buf <a href="../../bytes/buf/trait.Buf.html#tymethod.advance">Read more</a></p>
|
||
</div><h4 id='method.bytes_vec' class="method hidden"><code id='bytes_vec.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.bytes_vec' class='fnname'>bytes_vec</a><'a>(&'a self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a>&'a <a class="struct" href="../../iovec/struct.IoVec.html" title="struct iovec::IoVec">IoVec</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#149-160' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Fills <code>dst</code> with potentially multiple slices starting at <code>self</code>'s current position. <a href="../../bytes/buf/trait.Buf.html#method.bytes_vec">Read more</a></p>
|
||
</div><h4 id='method.has_remaining' class="method hidden"><code id='has_remaining.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.has_remaining' class='fnname'>has_remaining</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#213-215' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns true if there are any more bytes to consume <a href="../../bytes/buf/trait.Buf.html#method.has_remaining">Read more</a></p>
|
||
</div><h4 id='method.copy_to_slice' class="method hidden"><code id='copy_to_slice.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.copy_to_slice' class='fnname'>copy_to_slice</a>(&mut self, dst: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>)</code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#239-259' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Copies bytes from <code>self</code> into <code>dst</code>. <a href="../../bytes/buf/trait.Buf.html#method.copy_to_slice">Read more</a></p>
|
||
</div><h4 id='method.get_u8' class="method hidden"><code id='get_u8.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u8' class='fnname'>get_u8</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#278-283' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 8 bit integer from <code>self</code>. <a href="../../bytes/buf/trait.Buf.html#method.get_u8">Read more</a></p>
|
||
</div><h4 id='method.get_i8' class="method hidden"><code id='get_i8.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i8' class='fnname'>get_i8</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#302-307' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 8 bit integer from <code>self</code>. <a href="../../bytes/buf/trait.Buf.html#method.get_i8">Read more</a></p>
|
||
</div><h4 id='method.get_u16_be' class="method hidden"><code id='get_u16_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u16_be' class='fnname'>get_u16_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#334-336' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 16 bit integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u16_be">Read more</a></p>
|
||
</div><h4 id='method.get_u16_le' class="method hidden"><code id='get_u16_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u16_le' class='fnname'>get_u16_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#355-357' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 16 bit integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u16_le">Read more</a></p>
|
||
</div><h4 id='method.get_i16_be' class="method hidden"><code id='get_i16_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i16_be' class='fnname'>get_i16_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#384-386' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 16 bit integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i16_be">Read more</a></p>
|
||
</div><h4 id='method.get_i16_le' class="method hidden"><code id='get_i16_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i16_le' class='fnname'>get_i16_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#405-407' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 16 bit integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i16_le">Read more</a></p>
|
||
</div><h4 id='method.get_u32_be' class="method hidden"><code id='get_u32_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u32_be' class='fnname'>get_u32_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#434-436' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 32 bit integer from <code>self</code> in the big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u32_be">Read more</a></p>
|
||
</div><h4 id='method.get_u32_le' class="method hidden"><code id='get_u32_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u32_le' class='fnname'>get_u32_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#455-457' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 32 bit integer from <code>self</code> in the little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u32_le">Read more</a></p>
|
||
</div><h4 id='method.get_i32_be' class="method hidden"><code id='get_i32_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i32_be' class='fnname'>get_i32_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#484-486' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 32 bit integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i32_be">Read more</a></p>
|
||
</div><h4 id='method.get_i32_le' class="method hidden"><code id='get_i32_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i32_le' class='fnname'>get_i32_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#505-507' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 32 bit integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i32_le">Read more</a></p>
|
||
</div><h4 id='method.get_u64_be' class="method hidden"><code id='get_u64_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u64_be' class='fnname'>get_u64_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#534-536' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 64 bit integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u64_be">Read more</a></p>
|
||
</div><h4 id='method.get_u64_le' class="method hidden"><code id='get_u64_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_u64_le' class='fnname'>get_u64_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#555-557' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned 64 bit integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_u64_le">Read more</a></p>
|
||
</div><h4 id='method.get_i64_be' class="method hidden"><code id='get_i64_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i64_be' class='fnname'>get_i64_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#584-586' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 64 bit integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i64_be">Read more</a></p>
|
||
</div><h4 id='method.get_i64_le' class="method hidden"><code id='get_i64_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_i64_le' class='fnname'>get_i64_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#605-607' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed 64 bit integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_i64_le">Read more</a></p>
|
||
</div><h4 id='method.get_uint_be' class="method hidden"><code id='get_uint_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_uint_be' class='fnname'>get_uint_be</a>(&mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#726-728' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned n-byte integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_uint_be">Read more</a></p>
|
||
</div><h4 id='method.get_uint_le' class="method hidden"><code id='get_uint_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_uint_le' class='fnname'>get_uint_le</a>(&mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#747-749' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an unsigned n-byte integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_uint_le">Read more</a></p>
|
||
</div><h4 id='method.get_int_be' class="method hidden"><code id='get_int_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_int_be' class='fnname'>get_int_be</a>(&mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#776-778' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed n-byte integer from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_int_be">Read more</a></p>
|
||
</div><h4 id='method.get_int_le' class="method hidden"><code id='get_int_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_int_le' class='fnname'>get_int_le</a>(&mut self, nbytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#797-799' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a signed n-byte integer from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_int_le">Read more</a></p>
|
||
</div><h4 id='method.get_f32_be' class="method hidden"><code id='get_f32_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_f32_be' class='fnname'>get_f32_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#827-829' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an IEEE754 single-precision (4 bytes) floating point number from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_f32_be">Read more</a></p>
|
||
</div><h4 id='method.get_f32_le' class="method hidden"><code id='get_f32_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_f32_le' class='fnname'>get_f32_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#849-851' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an IEEE754 single-precision (4 bytes) floating point number from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_f32_le">Read more</a></p>
|
||
</div><h4 id='method.get_f64_be' class="method hidden"><code id='get_f64_be.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_f64_be' class='fnname'>get_f64_be</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#879-881' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an IEEE754 double-precision (8 bytes) floating point number from <code>self</code> in big-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_f64_be">Read more</a></p>
|
||
</div><h4 id='method.get_f64_le' class="method hidden"><code id='get_f64_le.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.get_f64_le' class='fnname'>get_f64_le</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets an IEEE754 double-precision (8 bytes) floating point number from <code>self</code> in little-endian byte order. <a href="../../bytes/buf/trait.Buf.html#method.get_f64_le">Read more</a></p>
|
||
</div><h4 id='method.collect' class="method hidden"><code id='collect.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.collect' class='fnname'>collect</a><B>(self) -> B <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> B: <a class="trait" href="../../bytes/buf/trait.FromBuf.html" title="trait bytes::buf::FromBuf">FromBuf</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#922-927' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Transforms a <code>Buf</code> into a concrete buffer. <a href="../../bytes/buf/trait.Buf.html#method.collect">Read more</a></p>
|
||
</div><h4 id='method.take' class="method hidden"><code id='take.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.take' class='fnname'>take</a>(self, limit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#951-955' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates an adaptor which will read at most <code>limit</code> bytes from <code>self</code>. <a href="../../bytes/buf/trait.Buf.html#method.take">Read more</a></p>
|
||
</div><h4 id='method.chain' class="method hidden"><code id='chain.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.chain' class='fnname'>chain</a><U>(self, next: U) -> <a class="struct" href="../../bytes/buf/struct.Chain.html" title="struct bytes::buf::Chain">Chain</a><Self, U::<a class="type" href="../../bytes/buf/trait.IntoBuf.html#associatedtype.Buf" title="type bytes::buf::IntoBuf::Buf">Buf</a>> <span class="where fmt-newline">where<br> U: <a class="trait" href="../../bytes/buf/trait.IntoBuf.html" title="trait bytes::buf::IntoBuf">IntoBuf</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#974-979' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates an adaptor which will chain this buffer with another. <a href="../../bytes/buf/trait.Buf.html#method.chain">Read more</a></p>
|
||
</div><h4 id='method.by_ref' class="method hidden"><code id='by_ref.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.by_ref' class='fnname'>by_ref</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#1004-1006' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates a "by reference" adaptor for this instance of <code>Buf</code>. <a href="../../bytes/buf/trait.Buf.html#method.by_ref">Read more</a></p>
|
||
</div><h4 id='method.reader' class="method hidden"><code id='reader.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.reader' class='fnname'>reader</a>(self) -> <a class="struct" href="../../bytes/buf/struct.Reader.html" title="struct bytes::buf::Reader">Reader</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#1031-1033' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates an adaptor which implements the <code>Read</code> trait for <code>self</code>. <a href="../../bytes/buf/trait.Buf.html#method.reader">Read more</a></p>
|
||
</div><h4 id='method.iter' class="method hidden"><code id='iter.v'>fn <a href='../../bytes/buf/trait.Buf.html#method.iter' class='fnname'>iter</a>(self) -> <a class="struct" href="../../bytes/buf/struct.Iter.html" title="struct bytes::buf::Iter">Iter</a><Self> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a class='srclink' href='../../src/bytes/buf/buf.rs.html#1050-1052' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns an iterator over the bytes contained by the buffer. <a href="../../bytes/buf/trait.Buf.html#method.iter">Read more</a></p>
|
||
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl<T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/bytes/buf/take.rs.html#9' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/bytes/buf/take.rs.html#9' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>, </span></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../bytes/buf/struct.Take.html" title="struct bytes::buf::Take">Take</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#564-568' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#565-567' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-560' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#557-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#601-610' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#607-609' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587-596' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="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><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#593-595' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "bytes";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |