#[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 moresource§fn has_data_left(&mut self) -> Result<bool>
 
fn has_data_left(&mut self) -> Result<bool>
🔬This is a nightly-only experimental API. (
buf_read_has_data_left #86423)Check if the underlying 
Read has any data left to be read. Read moresource§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 String buffer. Read moresource§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, _cursor: BorrowedCursor<'_>) -> Result<()>
 
fn read_buf(&mut self, _cursor: BorrowedCursor<'_>) -> Result<()>
🔬This is a nightly-only experimental API. (
read_buf #78485)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 moresource§fn is_read_vectored(&self) -> bool
 
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector #69941)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 moresource§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 more1.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 moresource§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<()>
 
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<()>
🔬This is a nightly-only experimental API. (
read_buf #78485)Read 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” adaptor for this instance of 
Read. Read more1.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>
🔬This is a nightly-only experimental API. (
seek_stream_len #59359)Returns the length of this stream (in bytes). Read more