Struct tower_http::services::fs::AsyncReadBody
source · [−]pub struct AsyncReadBody<T> { /* private fields */ }
fs
only.Expand description
Adapter that turns an impl AsyncRead
to an impl Body
.
Trait Implementations
sourceimpl<T> Body for AsyncReadBody<T> where
T: AsyncRead,
impl<T> Body for AsyncReadBody<T> where
T: AsyncRead,
sourcefn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
Attempt to pull out the next data buffer of this stream.
sourcefn poll_trailers(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
fn poll_trailers(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
Poll for an optional single HeaderMap
of trailers. Read more
sourcefn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns true
when the end of stream has been reached. Read more
sourcefn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
Returns the bounds on the remaining length of the stream. Read more
sourcefn data(&mut self) -> Data<'_, Self> where
Self: Unpin,
fn data(&mut self) -> Data<'_, Self> where
Self: Unpin,
Returns future that resolves to next data chunk, if any.
sourcefn trailers(&mut self) -> Trailers<'_, Self> where
Self: Unpin,
fn trailers(&mut self) -> Trailers<'_, Self> where
Self: Unpin,
Returns future that resolves to trailers, if any.
sourcefn map_data<F, B>(self, f: F) -> MapData<Self, F> where
F: FnMut(Self::Data) -> B,
B: Buf,
fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
F: FnMut(Self::Data) -> B,
B: Buf,
Maps this body’s data value to a different value.
sourcefn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> E,
Maps this body’s error value to a different value.
sourcefn boxed(self) -> BoxBody<Self::Data, Self::Error> where
Self: 'static + Send + Sync,
fn boxed(self) -> BoxBody<Self::Data, Self::Error> where
Self: 'static + Send + Sync,
Turn this body into a boxed trait object.
sourcefn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error> where
Self: 'static + Send,
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error> where
Self: 'static + Send,
Turn this body into a boxed trait object that is !Sync.
sourceimpl<T: Debug> Debug for AsyncReadBody<T>
impl<T: Debug> Debug for AsyncReadBody<T>
impl<'__pin, T> Unpin for AsyncReadBody<T> where
__Origin<'__pin, T>: Unpin,
Auto Trait Implementations
impl<T> RefUnwindSafe for AsyncReadBody<T> where
T: RefUnwindSafe,
impl<T> Send for AsyncReadBody<T> where
T: Send,
impl<T> Sync for AsyncReadBody<T> where
T: Sync,
impl<T> UnwindSafe for AsyncReadBody<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> PolicyExt for T where
T: ?Sized,
impl<T> PolicyExt for T where
T: ?Sized,
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more