Trait tonic::body::Body [−][src]
A trait alias for http_body::Body
.
Associated Types
type Data: Buf
[src]
The body data type.
type Error: Into<Box<dyn Error + Send + Sync>>
[src]
The errors produced from the body.
Required methods
fn is_end_stream(&self) -> bool
[src]
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>>>
[src]
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>>
[src]
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>>,
type Data = T::Data
type Error = T::Error
fn is_end_stream(&self) -> bool
[src]
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>