#[non_exhaustive]pub struct Empty;
Expand description
Trait Implementations
sourceimpl BufRead for Empty
impl BufRead for Empty
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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. Read more
sourceimpl Read for Empty
impl Read for Empty
sourcefn 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
sourcefn 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 · sourcefn 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
sourcefn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
Determines if this Read
er has an efficient read_vectored
implementation. Read more
sourcefn 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
sourcefn 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 · sourcefn 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
sourcefn 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
sourcefn 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
sourcefn bytes(self) -> Bytes<Self>ⓘNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>;
where
Self: Sized,
fn bytes(self) -> Bytes<Self>ⓘNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>;
where
Self: Sized,
1.51.0 · sourceimpl Seek for Empty
impl Seek for Empty
sourcefn 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
sourcefn stream_len(&mut self) -> Result<u64>
fn stream_len(&mut self) -> Result<u64>
Returns the length of this stream (in bytes). Read more
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more