Struct micro_http::protocol::body::ReqBody
source · pub struct ReqBody { /* private fields */ }Implementations§
source§impl ReqBody
impl ReqBody
pub fn body_channel<S>( payload_stream: &mut S ) -> (ReqBody, ReqBodySender<'_, S>)where S: Stream + Unpin,
Trait Implementations§
source§impl Body for ReqBody
impl Body for ReqBody
§type Error = ParseError
type Error = ParseError
The error type this
Body might generate.source§fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
Attempt to pull out the next data buffer of this stream.
source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns
true when the end of stream has been reached. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ReqBody
impl Send for ReqBody
impl Sync for ReqBody
impl Unpin for ReqBody
impl !UnwindSafe for ReqBody
Blanket Implementations§
source§impl<T> BodyExt for Twhere
T: Body + ?Sized,
impl<T> BodyExt for Twhere T: Body + ?Sized,
source§fn frame(&mut self) -> Frame<'_, Self>where
Self: Unpin,
fn frame(&mut self) -> Frame<'_, Self>where Self: Unpin,
Returns a future that resolves to the next
Frame, if any.source§fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>where
Self: Sized,
F: FnMut(Frame<Self::Data>) -> Frame<B>,
B: Buf,
fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>where Self: Sized, F: FnMut(Frame<Self::Data>) -> Frame<B>, B: Buf,
Maps this body’s frame to a different kind.
source§fn map_err<F, E>(self, f: F) -> MapErr<Self, F>where
Self: Sized,
F: FnMut(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>where Self: Sized, F: FnMut(Self::Error) -> E,
Maps this body’s error value to a different value.
source§fn boxed(self) -> BoxBody<Self::Data, Self::Error>where
Self: Sized + Send + Sync + 'static,
fn boxed(self) -> BoxBody<Self::Data, Self::Error>where Self: Sized + Send + Sync + 'static,
Turn this body into a boxed trait object.
source§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>where
Self: Sized + Send + 'static,
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>where Self: Sized + Send + 'static,
Turn this body into a boxed trait object that is !Sync.