Struct Empty

struct Empty

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

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

Implementations

impl BufRead for Empty

fn fill_buf(self: &mut Self) -> Result<&[u8]>
fn consume(self: &mut Self, _n: usize)
fn has_data_left(self: &mut Self) -> Result<bool>
fn read_until(self: &mut Self, _byte: u8, _buf: &mut Vec<u8>) -> Result<usize>
fn skip_until(self: &mut Self, _byte: u8) -> Result<usize>
fn read_line(self: &mut Self, _buf: &mut String) -> Result<usize>

impl Clone for Empty

fn clone(self: &Self) -> Empty

impl Copy for Empty

impl Debug for Empty

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

impl Default for Empty

fn default() -> Empty

impl Freeze for Empty

impl Read for Empty

fn read(self: &mut Self, _buf: &mut [u8]) -> Result<usize>
fn read_buf(self: &mut Self, _cursor: BorrowedCursor<'_>) -> Result<()>
fn read_vectored(self: &mut Self, _bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
fn is_read_vectored(self: &Self) -> bool
fn read_exact(self: &mut Self, buf: &mut [u8]) -> Result<()>
fn read_buf_exact(self: &mut Self, cursor: BorrowedCursor<'_>) -> Result<()>
fn read_to_end(self: &mut Self, _buf: &mut Vec<u8>) -> Result<usize>
fn read_to_string(self: &mut Self, _buf: &mut String) -> Result<usize>

impl RefUnwindSafe for Empty

impl Seek for Empty

fn seek(self: &mut Self, _pos: SeekFrom) -> Result<u64>
fn stream_len(self: &mut Self) -> Result<u64>
fn stream_position(self: &mut Self) -> Result<u64>

impl Send for Empty

impl Sync for Empty

impl Unpin for Empty

impl UnsafeUnpin for Empty

impl UnwindSafe for Empty

impl Write for Empty

fn write(self: &mut Self, buf: &[u8]) -> Result<usize>
fn write_vectored(self: &mut Self, bufs: &[IoSlice<'_>]) -> Result<usize>
fn is_write_vectored(self: &Self) -> bool
fn write_all(self: &mut Self, _buf: &[u8]) -> Result<()>
fn write_all_vectored(self: &mut Self, _bufs: &mut [IoSlice<'_>]) -> Result<()>
fn write_fmt(self: &mut Self, _args: Arguments<'_>) -> Result<()>
fn flush(self: &mut Self) -> Result<()>

impl<T> Any for Empty

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Empty

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Empty

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

impl<T> CloneToUninit for Empty

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

impl<T> From for Empty

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Empty

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Empty

fn into(self: 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 for Empty

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Empty

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