mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
133 lines
69 KiB
HTML
133 lines
69 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="An interface for types that can be used as a response body."><title>MessageBody in actix_web::body - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">MessageBody</a></h2><div class="sidebar-elems"><section><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Error">Error</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.poll_next">poll_next</a></li><li><a href="#tymethod.size">size</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.boxed">boxed</a></li><li><a href="#method.try_into_bytes">try_into_bytes</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-MessageBody-for-%26%5Bu8%5D">&'static [u8]</a></li><li><a href="#impl-MessageBody-for-%26str">&'static str</a></li><li><a href="#impl-MessageBody-for-%26mut+B">&mut B</a></li><li><a href="#impl-MessageBody-for-()">()</a></li><li><a href="#impl-MessageBody-for-Box%3CB%3E">Box<B></a></li><li><a href="#impl-MessageBody-for-ByteString">ByteString</a></li><li><a href="#impl-MessageBody-for-Cow%3C'static,+%5Bu8%5D%3E">Cow<'static, [u8]></a></li><li><a href="#impl-MessageBody-for-Cow%3C'static,+str%3E">Cow<'static, str></a></li><li><a href="#impl-MessageBody-for-Infallible">Infallible</a></li><li><a href="#impl-MessageBody-for-Pin%3CT%3E">Pin<T></a></li><li><a href="#impl-MessageBody-for-String">String</a></li><li><a href="#impl-MessageBody-for-Vec%3Cu8%3E">Vec<u8></a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In actix_web::body</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait
|
|||
|
type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>>;
|
|||
|
|
|||
|
// Required methods
|
|||
|
fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a>;
|
|||
|
<span class="item-spacer"></span> fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
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 Self</a>>,
|
|||
|
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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, Self::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>>;
|
|||
|
|
|||
|
// Provided methods
|
|||
|
fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, Self>
|
|||
|
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
|||
|
<span class="item-spacer"></span> fn <a href="#method.boxed" class="fn">boxed</a>(self) -> <a class="struct" href="struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a>
|
|||
|
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static</span> { ... }
|
|||
|
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An interface for types that can be used as a response body.</p>
|
|||
|
<p>It is not usually necessary to create custom body types, this trait is already <a href="#foreign-impls">implemented for
|
|||
|
a large number of sensible body types</a> including:</p>
|
|||
|
<ul>
|
|||
|
<li>Empty body: <code>()</code></li>
|
|||
|
<li>Text-based: <code>String</code>, <code>&'static str</code>, <a href="https://docs.rs/bytestring/1"><code>ByteString</code></a>.</li>
|
|||
|
<li>Byte-based: <code>Bytes</code>, <code>BytesMut</code>, <code>Vec<u8></code>, <code>&'static [u8]</code>;</li>
|
|||
|
<li>Streams: <a href="struct.BodyStream.html" title="struct actix_web::body::BodyStream"><code>BodyStream</code></a>, <a href="struct.SizedStream.html" title="struct actix_web::body::SizedStream"><code>SizedStream</code></a></li>
|
|||
|
</ul>
|
|||
|
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">struct </span>Repeat {
|
|||
|
chunk: String,
|
|||
|
n_times: usize,
|
|||
|
}
|
|||
|
|
|||
|
<span class="kw">impl </span>MessageBody <span class="kw">for </span>Repeat {
|
|||
|
<span class="kw">type </span>Error = Infallible;
|
|||
|
|
|||
|
<span class="kw">fn </span>size(<span class="kw-2">&</span><span class="self">self</span>) -> BodySize {
|
|||
|
BodySize::Sized((<span class="self">self</span>.chunk.len() * <span class="self">self</span>.n_times) <span class="kw">as </span>u64)
|
|||
|
}
|
|||
|
|
|||
|
<span class="kw">fn </span>poll_next(
|
|||
|
<span class="self">self</span>: Pin<<span class="kw-2">&mut </span><span class="self">Self</span>>,
|
|||
|
_cx: <span class="kw-2">&mut </span>Context<<span class="lifetime">'_</span>>,
|
|||
|
) -> Poll<<span class="prelude-ty">Option</span><<span class="prelude-ty">Result</span><Bytes, <span class="self">Self</span>::Error>>> {
|
|||
|
<span class="kw">let </span>payload_string = <span class="self">self</span>.chunk.repeat(<span class="self">self</span>.n_times);
|
|||
|
<span class="kw">let </span>payload_bytes = Bytes::from(payload_string);
|
|||
|
Poll::Ready(<span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(payload_bytes)))
|
|||
|
}
|
|||
|
}</code></pre></div>
|
|||
|
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Error" class="method"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#60">source</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>></h4></section></summary><div class="docblock"><p>The type of error that will be returned if streaming body fails.</p>
|
|||
|
<p>Since it is not appropriate to generate a response mid-stream, it only requires <code>Error</code> for
|
|||
|
internal use and logging.</p>
|
|||
|
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.size" class="method"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#65">source</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section></summary><div class="docblock"><p>Body size hint.</p>
|
|||
|
<p>If <a href="enum.BodySize.html#variant.None" title="variant actix_web::body::BodySize::None"><code>BodySize::None</code></a> is returned, optimizations that skip reading the body are allowed.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.poll_next" class="method"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#84-87">source</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
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 Self</a>>,
|
|||
|
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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, Self::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section></summary><div class="docblock"><p>Attempt to pull out the next chunk of body bytes.</p>
|
|||
|
<h5 id="return-value"><a class="doc-anchor" href="#return-value">§</a>Return Value</h5>
|
|||
|
<p>Similar to the <code>Stream</code> interface, there are several possible return values, each indicating
|
|||
|
a distinct state:</p>
|
|||
|
<ul>
|
|||
|
<li><code>Poll::Pending</code> means that this body’s next chunk is not ready yet. Implementations must
|
|||
|
ensure that the current task will be notified when the next chunk may be ready.</li>
|
|||
|
<li><code>Poll::Ready(Some(val))</code> means that the body has successfully produced a chunk, <code>val</code>,
|
|||
|
and may produce further values on subsequent <code>poll_next</code> calls.</li>
|
|||
|
<li><code>Poll::Ready(None)</code> means that the body is complete, and <code>poll_next</code> should not be
|
|||
|
invoked again.</li>
|
|||
|
</ul>
|
|||
|
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
|||
|
<p>Once a body is complete (i.e., <code>poll_next</code> returned <code>Ready(None)</code>), calling its <code>poll_next</code>
|
|||
|
method again may panic, block forever, or cause other kinds of problems; this trait places
|
|||
|
no requirements on the effects of such a call. However, as the <code>poll_next</code> method is not
|
|||
|
marked unsafe, Rust’s usual rules apply: calls must never cause UB, regardless of its state.</p>
|
|||
|
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.try_into_bytes" class="method"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#101-103">source</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, Self><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Try to convert into the complete chunk of body bytes.</p>
|
|||
|
<p>Override this method if the complete body can be trivially extracted. This is useful for
|
|||
|
optimizations where <code>poll_next</code> calls can be avoided.</p>
|
|||
|
<p>Body types with <a href="enum.BodySize.html#variant.None" title="variant actix_web::body::BodySize::None"><code>BodySize::None</code></a> are allowed to return empty <code>Bytes</code>. Although, if calling
|
|||
|
this method, it is recommended to check <code>size</code> first and return early.</p>
|
|||
|
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
|
|||
|
<p>The default implementation will error and return the original type back to the caller for
|
|||
|
further use.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.boxed" class="method"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#114-116">source</a><h4 class="code-header">fn <a href="#method.boxed" class="fn">boxed</a>(self) -> <a class="struct" href="struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a><div class="where">where
|
|||
|
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Wraps this body into a <code>BoxBody</code>.</p>
|
|||
|
<p>No-op when called on a <code>BoxBody</code>, meaning there is no risk of double boxing when calling
|
|||
|
this on a generic <code>MessageBody</code>. Prefer this over <a href="struct.BoxBody.html#method.new" title="associated function actix_web::body::BoxBody::new"><code>BoxBody::new</code></a> when a boxed body
|
|||
|
is required.</p>
|
|||
|
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-%26str" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#360">source</a><a href="#impl-MessageBody-for-%26str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#364">source</a><a href="#method.size" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#369-372">source</a><a href="#method.poll_next" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <&'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-1" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#383">source</a><a href="#method.try_into_bytes-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-%26%5Bu8%5D" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#223">source</a><a href="#impl-MessageBody-for-%26%5Bu8%5D" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for &'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]</h3></section></summary><div class="impl-items"><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-1" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#227">source</a><a href="#method.size-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-1" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#232-235">source</a><a href="#method.poll_next-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut &'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <&'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>] as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-2" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#244">source</a><a href="#method.try_into_bytes-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, &'static [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Cow%3C'static,+str%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#415">source</a><a href="#impl-MessageBody-for-Cow%3C'static,+str%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-2" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#419">source</a><a href="#method.size-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-2" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#424-427">source</a><a href="#method.poll_next-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-3" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#440">source</a><a href="#method.try_into_bytes-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Cow%3C'static,+%5Bu8%5D%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#327">source</a><a href="#impl-MessageBody-for-Cow%3C'static,+%5Bu8%5D%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-3" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#331">source</a><a href="#method.size-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-3" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#336-339">source</a><a href="#method.poll_next-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-4" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#352">source</a><a href="#method.try_into_bytes-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Infallible" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#145">source</a><a href="#impl-MessageBody-for-Infallible" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-4" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#148">source</a><a href="#method.size-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-4" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#152-155">source</a><a href="#method.poll_next-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-()" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#160">source</a><a href="#impl-MessageBody-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-5" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#164">source</a><a href="#method.size-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-5" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#169-172">source</a><a href="#method.poll_next-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-5" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#177">source</a><a href="#method.try_into_bytes-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-String" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#388">source</a><a href="#impl-MessageBody-for-String" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-7" class="associatedtype trait-impl"><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-6" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#392">source</a><a href="#method.size-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-6" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#397-400">source</a><a href="#method.poll_next-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-6" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#410">source</a><a href="#method.try_into_bytes-6" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Vec%3Cu8%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#301">source</a><a href="#impl-MessageBody-for-Vec%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-8" class="associatedtype trait-impl"><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-7" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#305">source</a><a href="#method.size-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-7" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#310-313">source</a><a href="#method.poll_next-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-7" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#322">source</a><a href="#method.try_into_bytes-7" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-ByteString" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#448">source</a><a href="#impl-MessageBody-for-ByteString" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for ByteString</h3></section></summary><div class="impl-items"><section id="associatedtype.Error-9" class="associatedtype trait-impl"><a href="#associatedtype.Error-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section><section id="method.size-8" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#452">source</a><a href="#method.size-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-8" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#457-460">source</a><a href="#method.poll_next-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut ByteString>,
|
|||
|
_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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <ByteString as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section><section id="method.try_into_bytes-8" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#466">source</a><a href="#method.try_into_bytes-8" class="anchor">§</a><h4 class="code-header">fn <a href="#method.try_into_bytes" class="fn">try_into_bytes</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, ByteString></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-%26mut+B" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#127-129">source</a><a href="#impl-MessageBody-for-%26mut+B" class="anchor">§</a><h3 class="code-header">impl<B> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a><div class="where">where
|
|||
|
B: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</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>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-10" class="associatedtype trait-impl"><a href="#associatedtype.Error-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <B as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a></h4></section><section id="method.size-9" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#133">source</a><a href="#method.size-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-9" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#137-140">source</a><a href="#method.poll_next-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>>,
|
|||
|
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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Box%3CB%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#182-184">source</a><a href="#impl-MessageBody-for-Box%3CB%3E" class="anchor">§</a><h3 class="code-header">impl<B> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><B><div class="where">where
|
|||
|
B: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</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>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-11" class="associatedtype trait-impl"><a href="#associatedtype.Error-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <B as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a></h4></section><section id="method.size-10" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#189">source</a><a href="#method.size-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-10" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#194-197">source</a><a href="#method.poll_next-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><B>>,
|
|||
|
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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><B> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Pin%3CT%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#202-205">source</a><a href="#impl-MessageBody-for-Pin%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T, B> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><T><div class="where">where
|
|||
|
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a><Target = B> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
|||
|
B: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-12" class="associatedtype trait-impl"><a href="#associatedtype.Error-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <B as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a></h4></section><section id="method.size-11" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#210">source</a><a href="#method.size-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.size" class="fn">size</a>(&self) -> <a class="enum" href="enum.BodySize.html" title="enum actix_web::body::BodySize">BodySize</a></h4></section><section id="method.poll_next-11" class="method trait-impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#215-218">source</a><a href="#method.poll_next-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.poll_next" class="fn">poll_next</a>(
|
|||
|
self: <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><&mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><T>>,
|
|||
|
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><'_>
|
|||
|
) -> <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><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, <<a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><T> as <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>>::<a class="associatedtype" href="trait.MessageBody.html#associatedtype.Error" title="type actix_web::body::MessageBody::Error">Error</a>>>></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-Bytes" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#249">source</a><a href="#impl-MessageBody-for-Bytes" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-13" class="associatedtype trait-impl"><a href="#associatedtype.Error-13" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-BytesMut" class="impl"><a class="src rightside" href="../../src/actix_http/body/message_body.rs.html#275">source</a><a href="#impl-MessageBody-for-BytesMut" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="../web/struct.BytesMut.html" title="struct actix_web::web::BytesMut">BytesMut</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-14" class="associatedtype trait-impl"><a href="#associatedtype.Error-14" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-BoxBody" class="impl"><a class="src rightside" href="../../src/actix_http/body/boxed.rs.html#62">source</a><a href="#impl-MessageBody-for-BoxBody" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="struct.BoxBody.html" title="struct actix_web::body::BoxBody">BoxBody</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-15" class="associatedtype trait-impl"><a href="#associatedtype.Error-15" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id
|
|||
|
B: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-17" class="associatedtype trait-impl"><a href="#associatedtype.Error-17" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = EncoderError</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-EitherBody%3CL,+R%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/either.rs.html#60-63">source</a><a href="#impl-MessageBody-for-EitherBody%3CL,+R%3E" class="anchor">§</a><h3 class="code-header">impl<L, R> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="enum" href="enum.EitherBody.html" title="enum actix_web::body::EitherBody">EitherBody</a><L, R><div class="where">where
|
|||
|
L: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + 'static,
|
|||
|
R: <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> + 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-18" class="associatedtype trait-impl"><a href="#associatedtype.Error-18" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../http/struct.Error.html" title="struct actix_web::http::Error">Error</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-BodyStream%3CS%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/body_stream.rs.html#36-39">source</a><a href="#impl-MessageBody-for-BodyStream%3CS%3E" class="anchor">§</a><h3 class="code-header">impl<S, E> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="struct.BodyStream.html" title="struct actix_web::body::BodyStream">BodyStream</a><S><div class="where">where
|
|||
|
S: Stream<Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, E>>,
|
|||
|
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>> + 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-19" class="associatedtype trait-impl"><a href="#associatedtype.Error-19" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = E</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-MessageBody-for-SizedStream%3CS%3E" class="impl"><a class="src rightside" href="../../src/actix_http/body/sized_stream.rs.html#38-41">source</a><a href="#impl-MessageBody-for-SizedStream%3CS%3E" class="anchor">§</a><h3 class="code-header">impl<S, E> <a class="trait" href="trait.MessageBody.html" title="trait actix_web::body::MessageBody">MessageBody</a> for <a class="struct" href="struct.SizedStream.html" title="struct actix_web::body::SizedStream">SizedStream</a><S><div class="where">where
|
|||
|
S: Stream<Item = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../web/struct.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a>, E>>,
|
|||
|
E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/error/trait.Error.html" title="trait core::error::Error">Error</a>>> + 'static,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Error-20" class="associatedtype trait-impl"><a href="#associatedtype.Error-20" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Error" class="associatedtype">Error</a> = E</h4></section></div></details></div><script src="../../trait.impl/actix_http/body/message_body/trait.MessageBody.js" data-ignore-extern-crates="alloc,core,bytes,actix_http,bytestring,std" async></script></section></div></main></body></html>
|