Struct http_body::Full [−][src]
pub struct Full<D> { /* fields omitted */ }
A body that consists of a single chunk.
Implementations
Trait Implementations
impl<D> Body for Full<D> where
D: Buf,
[src]
impl<D> Body for Full<D> where
D: Buf,
[src]type Data = D
type Data = D
Values yielded by the Body
.
type Error = Infallible
type Error = Infallible
The error type this Body
might generate.
fn poll_data(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Option<Result<D, Self::Error>>>
[src]
fn poll_data(
self: Pin<&mut Self>,
_cx: &mut Context<'_>
) -> Poll<Option<Result<D, 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<D> From<&'static [u8]> for Full<D> where
D: Buf + From<&'static [u8]>,
[src]
impl<D> From<&'static [u8]> for Full<D> where
D: Buf + From<&'static [u8]>,
[src]fn from(slice: &'static [u8]) -> Self
[src]
fn from(slice: &'static [u8]) -> Self
[src]Performs the conversion.
impl<D, B: ?Sized> From<Cow<'static, B>> for Full<D> where
D: Buf + From<&'static B> + From<B::Owned>,
B: ToOwned,
[src]
impl<D, B: ?Sized> From<Cow<'static, B>> for Full<D> where
D: Buf + From<&'static B> + From<B::Owned>,
B: ToOwned,
[src]impl<D: Copy> Copy for Full<D>
[src]
impl<'__pin, D> Unpin for Full<D> where
__Origin<'__pin, D>: Unpin,
[src]
__Origin<'__pin, D>: Unpin,
Auto Trait Implementations
impl<D> RefUnwindSafe for Full<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for Full<D> where
D: Send,
D: Send,
impl<D> Sync for Full<D> where
D: Sync,
D: Sync,
impl<D> UnwindSafe for Full<D> where
D: UnwindSafe,
D: 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 = T
The 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