Struct http_body::combinators::MapData [−][src]
pub struct MapData<B, F> { /* fields omitted */ }Body returned by the map_data combinator.
Implementations
impl<B, F> MapData<B, F>[src]
impl<B, F> MapData<B, F>[src]pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>[src]
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>[src]Get a pinned mutable reference to the inner body
pub fn into_inner(self) -> B[src]
pub fn into_inner(self) -> B[src]Consume self, returning the inner body
Trait Implementations
impl<B, F, B2> Body for MapData<B, F> where
B: Body,
F: FnMut(B::Data) -> B2,
B2: Buf, [src]
impl<B, F, B2> Body for MapData<B, F> where
B: Body,
F: FnMut(B::Data) -> B2,
B2: Buf, [src]type Data = B2
type Data = B2Values yielded by the Body.
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>[src]
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>[src]Attempt to pull out the next data buffer of this stream.
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>[src]
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>[src]Poll for an optional single HeaderMap of trailers. Read more
fn is_end_stream(&self) -> bool[src]
fn is_end_stream(&self) -> bool[src]Returns true when the end of stream has been reached. Read more
fn size_hint(&self) -> SizeHint[src]
fn size_hint(&self) -> SizeHint[src]Returns the bounds on the remaining length of the stream. Read more
fn data(&mut self) -> Data<'_, Self>ⓘ where
Self: Unpin + Sized, [src]
fn data(&mut self) -> Data<'_, Self>ⓘ where
Self: Unpin + Sized, [src]Returns future that resolves to next data chunk, if any.
fn trailers(&mut self) -> Trailers<'_, Self>ⓘ where
Self: Unpin + Sized, [src]
fn trailers(&mut self) -> Trailers<'_, Self>ⓘ where
Self: Unpin + Sized, [src]Returns future that resolves to trailers, if any.
fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
Self: Sized,
F: FnMut(Self::Data) -> B,
B: Buf, [src]
fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
Self: Sized,
F: FnMut(Self::Data) -> B,
B: Buf, [src]Maps this body’s data value to a different value.
impl<B: Copy, F: Copy> Copy for MapData<B, F>[src]
impl<'__pin, B, F> Unpin for MapData<B, F> where
__Origin<'__pin, B, F>: Unpin, [src]
__Origin<'__pin, B, F>: Unpin,
Auto Trait Implementations
impl<B, F> RefUnwindSafe for MapData<B, F> where
B: RefUnwindSafe,
F: RefUnwindSafe,
B: RefUnwindSafe,
F: RefUnwindSafe,
impl<B, F> Send for MapData<B, F> where
B: Send,
F: Send,
B: Send,
F: Send,
impl<B, F> Sync for MapData<B, F> where
B: Sync,
F: Sync,
B: Sync,
F: Sync,
impl<B, F> UnwindSafe for MapData<B, F> where
B: UnwindSafe,
F: UnwindSafe,
B: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more