Struct http_body::Empty [−][src]
pub struct Empty<D> { /* fields omitted */ }
A body that is always empty.
Implementations
Trait Implementations
impl<D: Buf> Body for Empty<D>
[src]
impl<D: Buf> Body for Empty<D>
[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<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<D> Copy for Empty<D>
[src]
Auto Trait Implementations
impl<D> RefUnwindSafe for Empty<D>
impl<D> Send for Empty<D>
impl<D> Sync for Empty<D>
impl<D> Unpin for Empty<D>
impl<D> UnwindSafe for Empty<D>
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