37 lines
48 KiB
HTML
37 lines
48 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="Trait representing a streaming body of a Request or Response."><meta name="keywords" content="rust, rustlang, rust-lang, Body"><title>http_body::Body - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[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='../http_body/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Trait Body</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Error">Error</a><a href="#associatedtype.Data">Data</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.poll_data">poll_data</a><a href="#tymethod.poll_trailers">poll_trailers</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.size_hint">size_hint</a><a href="#method.is_end_stream">is_end_stream</a><a href="#method.data">data</a><a href="#method.trailers">trailers</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Body-for-%26mut%20T">&mut T</a><a href="#impl-Body-for-Box%3CT%3E">Box<T></a><a href="#impl-Body-for-Pin%3CP%3E">Pin<P></a><a href="#impl-Body-for-Request%3CB%3E">Request<B></a><a href="#impl-Body-for-Response%3CB%3E">Response<B></a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="index.html">http_body</a></p><div id="sidebar-vars" data-name="Body" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></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><button type="button" class="help-button">?</button>
|
||
<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="in-band">Trait <a href="index.html">http_body</a>::<wbr><a class="trait" href="">Body</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/http_body/lib.rs.html#31-86" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Body {
|
||
type <a href="#associatedtype.Data" class="type">Data</a>: <a class="trait" href="../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a>;
|
||
type <a href="#associatedtype.Error" class="type">Error</a>;
|
||
fn <a href="#tymethod.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br> ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>>;
|
||
<div class="item-spacer"></div> fn <a href="#tymethod.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br> ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>;
|
||
|
||
fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a> { ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.data" class="fnname">data</a>(&mut self) -> <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'_, Self><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'a, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>;</span></code></span></div></span></span><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.trailers" class="fnname">trailers</a>(&mut self) -> <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'_, Self><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'a, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>;</span></code></span></div></span></span><br> <span class="where">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>,
|
||
{ ... }
|
||
}</pre></div><div class="docblock"><p>Trait representing a streaming body of a Request or Response.</p>
|
||
<p>Data is streamed via the <code>poll_data</code> function, which asynchronously yields <code>T: Buf</code> values. The
|
||
<code>size_hint</code> function provides insight into the total number of bytes that will be streamed.</p>
|
||
<p>The <code>poll_trailers</code> function returns an optional set of trailers used to finalize the request /
|
||
response exchange. This is mostly used when using the HTTP/2.0 protocol.</p>
|
||
</div><h2 id="associated-types" class="small-section-header">Associated Types<a href="#associated-types" class="anchor"></a></h2><div class="methods"><h3 id="associatedtype.Data" class="method"><code>type <a href="#associatedtype.Data" class="type">Data</a>: <a class="trait" href="../bytes/buf/buf_impl/trait.Buf.html" title="trait bytes::buf::buf_impl::Buf">Buf</a></code><a class="srclink" href="../src/http_body/lib.rs.html#33" title="goto source code">[src]</a></h3><div class="docblock"><p>Values yielded by the <code>Body</code>.</p>
|
||
</div><h3 id="associatedtype.Error" class="method"><code>type <a href="#associatedtype.Error" class="type">Error</a></code><a class="srclink" href="../src/http_body/lib.rs.html#36" title="goto source code">[src]</a></h3><div class="docblock"><p>The error type this <code>Body</code> might generate.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.poll_data" class="method"><code>fn <a href="#tymethod.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#39-42" title="goto source code">[src]</a></h3><div class="docblock"><p>Attempt to pull out the next data buffer of this stream.</p>
|
||
</div><h3 id="tymethod.poll_trailers" class="method"><code>fn <a href="#tymethod.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#47-50" title="goto source code">[src]</a></h3><div class="docblock"><p>Poll for an optional <strong>single</strong> <code>HeaderMap</code> of trailers.</p>
|
||
<p>This function should only be called once <code>poll_data</code> returns <code>None</code>.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.is_end_stream" class="method"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#59-61" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns <code>true</code> when the end of stream has been reached.</p>
|
||
<p>An end of stream means that both <code>poll_data</code> and <code>poll_trailers</code> will
|
||
return <code>None</code>.</p>
|
||
<p>A return value of <code>false</code> <strong>does not</strong> guarantee that a value will be
|
||
returned from <code>poll_stream</code> or <code>poll_trailers</code>.</p>
|
||
</div><h3 id="method.size_hint" class="method"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#67-69" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns the bounds on the remaining length of the stream.</p>
|
||
<p>When the <strong>exact</strong> remaining length of the stream is known, the upper bound will be set and
|
||
will equal the lower bound.</p>
|
||
</div><h3 id="method.data" class="method"><code>fn <a href="#method.data" class="fnname">data</a>(&mut self) -> <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'_, Self><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../http_body/struct.Data.html" title="struct http_body::Data">Data</a><'a, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <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/http_body/lib.rs.html#72-77" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns future that resolves to next data chunk, if any.</p>
|
||
</div><h3 id="method.trailers" class="method"><code>fn <a href="#method.trailers" class="fnname">trailers</a>(&mut self) -> <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'_, Self><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<div class="notable-traits-tooltiptext"><span class="docblock"><h3 class="notable">Notable traits for <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'a, T></h3><code class="content"><span class="where fmt-newline">impl<'a, T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a> for <a class="struct" href="../http_body/struct.Trailers.html" title="struct http_body::Trailers">Trailers</a><'a, T></span><span class="where fmt-newline"> type <a href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html#associatedtype.Output" class="type">Output</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>;</span></code></span></div></span></span> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <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/http_body/lib.rs.html#80-85" title="goto source code">[src]</a></h3><div class="docblock"><p>Returns future that resolves to trailers, if any.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><h3 id="impl-Body-for-%26mut%20T" class="impl"><code class="in-band">impl<T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a href="#impl-Body-for-%26mut%20T" class="anchor"></a><a class="srclink" href="../src/http_body/lib.rs.html#88-113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Data-1" class="type"><code>type <a href="#associatedtype.Data" class="type">Data</a> = T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a></code></h4><h4 id="associatedtype.Error-1" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a></code></h4><h4 id="method.poll_data" class="method hidden"><code>fn <a href="#method.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#92-97" title="goto source code">[src]</a></h4><h4 id="method.poll_trailers" class="method hidden"><code>fn <a href="#method.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#99-104" title="goto source code">[src]</a></h4><h4 id="method.is_end_stream-1" class="method hidden"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#106-108" title="goto source code">[src]</a></h4><h4 id="method.size_hint-1" class="method hidden"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#110-112" title="goto source code">[src]</a></h4></div><h3 id="impl-Body-for-Pin%3CP%3E" class="impl"><code class="in-band">impl<P> <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><P> <span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>,<br> P::<a class="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>: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a>, </span></code><a href="#impl-Body-for-Pin%3CP%3E" class="anchor"></a><a class="srclink" href="../src/http_body/lib.rs.html#115-144" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Data-2" class="type"><code>type <a href="#associatedtype.Data" class="type">Data</a> = <<P as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>>::<a class="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> as <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a>>::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a></code></h4><h4 id="associatedtype.Error-2" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = <<P as <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>>::<a class="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> as <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a>>::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a></code></h4><h4 id="method.poll_data-1" class="method hidden"><code>fn <a href="#method.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#123-128" title="goto source code">[src]</a></h4><h4 id="method.poll_trailers-1" class="method hidden"><code>fn <a href="#method.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#130-135" title="goto source code">[src]</a></h4><h4 id="method.is_end_stream-2" class="method hidden"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#137-139" title="goto source code">[src]</a></h4><h4 id="method.size_hint-2" class="method hidden"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#141-143" title="goto source code">[src]</a></h4></div><h3 id="impl-Body-for-Box%3CT%3E" class="impl"><code class="in-band">impl<T: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>> <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T></code><a href="#impl-Body-for-Box%3CT%3E" class="anchor"></a><a class="srclink" href="../src/http_body/lib.rs.html#146-171" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Data-3" class="type"><code>type <a href="#associatedtype.Data" class="type">Data</a> = T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a></code></h4><h4 id="associatedtype.Error-3" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = T::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a></code></h4><h4 id="method.poll_data-2" class="method hidden"><code>fn <a href="#method.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#150-155" title="goto source code">[src]</a></h4><h4 id="method.poll_trailers-2" class="method hidden"><code>fn <a href="#method.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#157-162" title="goto source code">[src]</a></h4><h4 id="method.is_end_stream-3" class="method hidden"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#164-166" title="goto source code">[src]</a></h4><h4 id="method.size_hint-3" class="method hidden"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#168-170" title="goto source code">[src]</a></h4></div><h3 id="impl-Body-for-Request%3CB%3E" class="impl"><code class="in-band">impl<B: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a>> <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> for <a class="struct" href="../http/request/struct.Request.html" title="struct http::request::Request">Request</a><B></code><a href="#impl-Body-for-Request%3CB%3E" class="anchor"></a><a class="srclink" href="../src/http_body/lib.rs.html#173-204" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Data-4" class="type"><code>type <a href="#associatedtype.Data" class="type">Data</a> = B::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a></code></h4><h4 id="associatedtype.Error-4" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = B::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a></code></h4><h4 id="method.poll_data-3" class="method hidden"><code>fn <a href="#method.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#177-185" title="goto source code">[src]</a></h4><h4 id="method.poll_trailers-3" class="method hidden"><code>fn <a href="#method.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#187-195" title="goto source code">[src]</a></h4><h4 id="method.is_end_stream-4" class="method hidden"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#197-199" title="goto source code">[src]</a></h4><h4 id="method.size_hint-4" class="method hidden"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#201-203" title="goto source code">[src]</a></h4></div><h3 id="impl-Body-for-Response%3CB%3E" class="impl"><code class="in-band">impl<B: <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a>> <a class="trait" href="../http_body/trait.Body.html" title="trait http_body::Body">Body</a> for <a class="struct" href="../http/response/struct.Response.html" title="struct http::response::Response">Response</a><B></code><a href="#impl-Body-for-Response%3CB%3E" class="anchor"></a><a class="srclink" href="../src/http_body/lib.rs.html#206-237" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Data-5" class="type"><code>type <a href="#associatedtype.Data" class="type">Data</a> = B::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a></code></h4><h4 id="associatedtype.Error-5" class="type"><code>type <a href="#associatedtype.Error" class="type">Error</a> = B::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a></code></h4><h4 id="method.poll_data-4" class="method hidden"><code>fn <a href="#method.poll_data" class="fnname">poll_data</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Data" title="type http_body::Body::Data">Data</a>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>>></code><a class="srclink" href="../src/http_body/lib.rs.html#210-218" title="goto source code">[src]</a></h4><h4 id="method.poll_trailers-4" class="method hidden"><code>fn <a href="#method.poll_trailers" class="fnname">poll_trailers</a>(<br> self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>Self>, <br> cx: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/task/wake/struct.Context.html" title="struct core::task::wake::Context">Context</a><'_><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/task/poll/enum.Poll.html" title="enum core::task::poll::Poll">Poll</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../http/header/map/struct.HeaderMap.html" title="struct http::header::map::HeaderMap">HeaderMap</a>>, Self::<a class="type" href="../http_body/trait.Body.html#associatedtype.Error" title="type http_body::Body::Error">Error</a>>></code><a class="srclink" href="../src/http_body/lib.rs.html#220-228" title="goto source code">[src]</a></h4><h4 id="method.is_end_stream-5" class="method hidden"><code>fn <a href="#method.is_end_stream" class="fnname">is_end_stream</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/http_body/lib.rs.html#230-232" title="goto source code">[src]</a></h4><h4 id="method.size_hint-5" class="method hidden"><code>fn <a href="#method.size_hint" class="fnname">size_hint</a>(&self) -> <a class="struct" href="../http_body/struct.SizeHint.html" title="struct http_body::SizeHint">SizeHint</a></code><a class="srclink" href="../src/http_body/lib.rs.html#234-236" title="goto source code">[src]</a></h4></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../implementors/http_body/trait.Body.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="http_body"></div>
|
||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |