Body

Trait Body 

Source
pub trait Body: Sealed {
    type Data: Buf;
    type Error: Into<Box<dyn Error + Send + Sync>>;

    // Required methods
    fn is_end_stream(&self) -> bool;
    fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>;
    fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>;
}
Expand description

A “trait alias” for tower_http_service::Body with bounds required by tower-grpc.

Not to be implemented directly, but instead useful for reducing bounds boilerplate.

Required Associated Types§

Required Methods§

Source

fn is_end_stream(&self) -> bool

Source

fn poll_data(&mut self) -> Poll<Option<Self::Data>, Self::Error>

Source

fn poll_trailers(&mut self) -> Poll<Option<HeaderMap>, Self::Error>

Implementors§

Source§

impl<T> Body for T
where T: HttpBody, T::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

type Data = <T as Body>::Data

Source§

type Error = <T as Body>::Error