[−][src]Trait tonic::body::Body
A trait alias for [http_body::Body
].
Associated Types
type Data: Buf
The body data type.
type Error: Into<Box<dyn Error + Send + Sync>>
The errors produced from the body.
Required methods
fn is_end_stream(&self) -> bool
Check if the stream is over or not.
Reference [http_body::Body::is_end_stream
].
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Option<Result<Self::Data, Self::Error>>>
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Option<Result<Self::Data, Self::Error>>>
Poll for more data from the body.
Reference [http_body::Body::poll_data
].
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
self: Pin<&mut Self>,
cx: &mut Context
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
Poll for the trailing headers.
Reference [http_body::Body::poll_trailers
].
Implementors
impl<T> Body for T where
T: HttpBody + Send + Sync + 'static,
T::Error: Into<Box<dyn Error + Send + Sync>>,
[src]
T: HttpBody + Send + Sync + 'static,
T::Error: Into<Box<dyn Error + Send + Sync>>,