Struct Empty

pub struct Empty<D> { /* private fields */ }

A body that is always empty.

Implementations

impl<D> Empty<D>

const fn new() -> Self

Create a new Empty.

Trait Implementations

impl<D> Clone for Empty<D>

fn clone(&self) -> Self

impl<D> Copy for Empty<D>

impl<D> Debug for Empty<D>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<D> Default for Empty<D>

fn default() -> Self

impl<D: Buf> Body for Empty<D>

type Data = D;
type Error = never;
fn poll_frame(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn is_end_stream(&self) -> bool
fn size_hint(&self) -> SizeHint

Auto Trait Implementations

impl<D> Freeze for Empty<D> where PhantomData<fn() -> D>: Freeze,

impl<D> RefUnwindSafe for Empty<D> where PhantomData<fn() -> D>: RefUnwindSafe,

impl<D> Send for Empty<D> where PhantomData<fn() -> D>: Send,

impl<D> Sync for Empty<D> where PhantomData<fn() -> D>: Sync,

impl<D> Unpin for Empty<D> where PhantomData<fn() -> D>: Unpin,

impl<D> UnsafeUnpin for Empty<D> where PhantomData<fn() -> D>: UnsafeUnpin,

impl<D> UnwindSafe for Empty<D> where PhantomData<fn() -> D>: UnwindSafe,

Blanket Implementations

impl<T> Any for Empty<D> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> BodyExt for Empty<D> where T: Body + ?Sized,

impl<T> Borrow<T> for Empty<D> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Empty<D> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Empty<D> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Empty<D>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Empty<D> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Empty<D> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Empty<D> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Empty<D> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>