Struct Empty
#[non_exhaustive]
pub 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.
Trait Implementations
impl Clone for Empty
fn clone(&self) -> Empty
impl Copy for Empty
impl Debug for Empty
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Empty
fn default() -> Empty
impl Seek for Empty
fn seek(&mut self, _pos: SeekFrom) -> Result<u64>fn stream_len(&mut self) -> Result<u64>fn stream_position(&mut self) -> Result<u64>
impl SizeHint for Empty
fn upper_bound(&self) -> Option<usize>
impl TrivialClone for Empty
impl Write for Empty
fn write(&mut self, buf: &[u8]) -> Result<usize>fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>fn is_write_vectored(&self) -> boolfn write_all(&mut self, _buf: &[u8]) -> Result<()>fn write_all_vectored(&mut self, _bufs: &mut [IoSlice<'_>]) -> Result<()>fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<()>fn flush(&mut self) -> 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<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> CloneToUninit for Empty
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Empty
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Empty
where
T: Copy + Debug,
impl<T> SizeHint for Empty
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Empty
impl<T, U> Into<U> for Empty
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Empty
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
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>