[−][src]Trait izanami_http::body::HttpBody
A trait that abstracts HTTP request/response bodies.
Associated Types
type Data: Buf
The type of bytes generated by this body.
type Error
The error type that will be returned from this body.
Required methods
Loading content...Provided methods
fn size_hint(&self) -> SizeHint
Returns the hint of remaining length of data.
fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>
Polls the trailing header map of this body.
fn is_end_stream(&self) -> bool
Returns whether the body has been completed emitting all chunks and trailer headers.
It is possible that this method returns false
even if the body has incomplete chunks or trailers.
fn content_length(&self) -> Option<u64>
Returns the length of total bytes contained in this body.
Implementors
impl HttpBody for Body
[src]
type Data = Data
type Error = Error
fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>
[src]
fn size_hint(&self) -> SizeHint
[src]
fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>
[src]
fn is_end_stream(&self) -> bool
[src]
fn content_length(&self) -> Option<u64>
[src]
impl<T> HttpBody for NoUpgrade<T> where
T: HttpBody,
[src]
T: HttpBody,
type Data = T::Data
type Error = T::Error
fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>
[src]
fn size_hint(&self) -> SizeHint
[src]
fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>
[src]
fn is_end_stream(&self) -> bool
[src]
fn content_length(&self) -> Option<u64>
[src]
impl<T, U> HttpBody for MaybeUpgrade<T, U> where
T: HttpBody,
[src]
T: HttpBody,