#[non_exhaustive]pub struct Empty;Expand description
Trait Implementations§
Source§impl BufRead for Empty
impl BufRead for Empty
Source§fn fill_buf(&mut self) -> Result<&[u8]>
fn fill_buf(&mut self) -> Result<&[u8]>
Returns the contents of the internal buffer, filling it with more data, via
Read methods,
if empty.Source§fn consume(&mut self, _n: usize)
fn consume(&mut self, _n: usize)
Marks the given
amount of additional bytes from the internal buffer as having been read.
Subsequent calls to read only return bytes that have not been marked as read.Source§fn has_data_left(&mut self) -> Result<bool>
fn has_data_left(&mut self) -> Result<bool>
Checks if there is any data left to be
read.Source§impl Read for Empty
impl Read for Empty
Source§fn read(&mut self, _buf: &mut [u8]) -> Result<usize>
fn read(&mut self, _buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read.
Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read the exact number of bytes required to fill
buf.Source§fn read_buf(&mut self, _cursor: BorrowedCursor<'_>) -> Result<()>
fn read_buf(&mut self, _cursor: BorrowedCursor<'_>) -> Result<()>
Pull some bytes from this source into the specified buffer. Read more
Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<()>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<()>
Reads the exact number of bytes required to fill
cursor. Read moreSource§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adapter for this instance of
Read. Read moreSource§impl Seek for Empty
impl Seek for Empty
Source§fn seek(&mut self, _pos: SeekFrom) -> Result<u64>
fn seek(&mut self, _pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64>
fn stream_len(&mut self) -> Result<u64>
Returns the length of this stream (in bytes).
Source§impl Write for &Empty
impl Write for &Empty
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written.
Source§fn write_all(&mut self, _buf: &[u8]) -> Result<()>
fn write_all(&mut self, _buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer.
Source§fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<()>
fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<()>
Writes a formatted string into this writer, returning any error
encountered.
Source§impl Write for Empty
impl Write for Empty
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written.
Source§fn write_all(&mut self, _buf: &[u8]) -> Result<()>
fn write_all(&mut self, _buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer.
Source§fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<()>
fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<()>
Writes a formatted string into this writer, returning any error
encountered.
impl Copy for Empty
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more