Struct Empty

pub struct Empty { /* private fields */ }

Empty ignores any data written via AsyncWrite, and will always be empty (returning zero bytes) when read via AsyncRead.

This struct is generally created by calling empty. Please see the documentation of empty() for more details.

This is an asynchronous version of std::io::empty.

Trait Implementations

impl AsyncBufRead for Empty

fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>>
fn consume(self: Pin<&mut Self>, usize)

impl AsyncRead for Empty

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, &mut ReadBuf<'_>) -> Poll<Result<()>>

impl AsyncSeek for Empty

fn start_seek(self: Pin<&mut Self>, _position: SeekFrom) -> Result<()>
fn poll_complete(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<u64>>

impl AsyncWrite for Empty

fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn is_write_vectored(&self) -> bool
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>]) -> Poll<Result<usize, Error>>

impl Debug for Empty

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

Auto Trait Implementations

impl Freeze for Empty

impl RefUnwindSafe for Empty

impl Send for Empty

impl Sync for Empty

impl Unpin for Empty

impl UnsafeUnpin for Empty

impl UnwindSafe for Empty

Blanket Implementations

impl<R> AsyncBufReadExt for Empty where R: AsyncBufRead + ?Sized,

impl<R> AsyncReadExt for Empty where R: AsyncRead + ?Sized,

impl<S> AsyncSeekExt for Empty where S: AsyncSeek + ?Sized,

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for Empty

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for Empty 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 where U: Into<T>,

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

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

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

impl<W> AsyncWriteExt for Empty where W: AsyncWrite + ?Sized,