#[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 from the inner reader if it is empty. Read more
source fn consume(&mut self, _n: usize)
fn consume(&mut self, _n: usize)
Tells this buffer that amt bytes have been consumed from the buffer,
so they should no longer be returned in calls to read. Read more
source fn has_data_left(&mut self) -> Result<bool>
fn has_data_left(&mut self) -> Result<bool>
Check if the underlying Read has any data left to be read. Read more
source fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
Read all bytes into buf until the delimiter byte or EOF is reached. Read more
source fn read_line(&mut self, buf: &mut String) -> Result<usize>
fn read_line(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until a newline (the 0xA byte) is reached, and append
them to the provided buffer. You do not need to clear the buffer before
appending. Read more
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. Read more
source fn read_buf(&mut self, _buf: &mut ReadBuf<'_>) -> Result<()>
fn read_buf(&mut self, _buf: &mut ReadBuf<'_>) -> Result<()>
Pull some bytes from this source into the specified buffer. Read more
1.36.0 · source fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
Like read, except that it reads into a slice of buffers. Read more
source fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
Determines if this Reader has an efficient read_vectored
implementation. Read more
source fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Read all bytes until EOF in this source, placing them into buf. Read more
source fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until EOF in this source, appending them to buf. Read more
1.6.0 · 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. Read more
source fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<()>
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<()>
Read the exact number of bytes required to fill buf. Read more
source fn by_ref(&mut self) -> &mut Self where
Self: Sized,
fn by_ref(&mut self) -> &mut Self where
Self: Sized,
Creates a "by reference" adaptor for this instance of Read. Read more
source fn bytes(self) -> Bytes<Self>iNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>; where
Self: Sized,
fn bytes(self) -> Bytes<Self>iNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>; where
Self: Sized,
1.51.0 · source 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). Read more
source fn stream_position(&mut self) -> Result<u64>
fn stream_position(&mut self) -> Result<u64>
Returns the current seek position from the start of the stream. Read more
impl Copy for Empty
Auto Trait Implementations
impl RefUnwindSafe for Empty
impl Send for Empty
impl Sync for Empty
impl Unpin for Empty
impl UnwindSafe for Empty
Blanket Implementations
source impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · source fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more