#[non_exhaustive]pub struct Empty;Expand description
Trait Implementations
impl BufRead for Empty
source
impl BufRead for Empty
sourcefn fill_buf(&mut self) -> Result<&[u8]>
source
fn fill_buf(&mut self) -> Result<&[u8]>
sourceReturns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
fn consume(&mut self, _n: usize)
source
fn consume(&mut self, _n: usize)
sourceTells this buffer that amt bytes have been consumed from the buffer,
so they should no longer be returned in calls to read. Read more
fn has_data_left(&mut self) -> Result<bool>
source
fn has_data_left(&mut self) -> Result<bool>
sourceCheck if the underlying Read has any data left to be read. Read more
fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
source
fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize>
sourceRead all bytes into buf until the delimiter byte or EOF is reached. Read more
fn read_line(&mut self, buf: &mut String) -> Result<usize>
source
fn read_line(&mut self, buf: &mut String) -> Result<usize>
sourceRead 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
impl Read for Empty
source
impl Read for Empty
sourcefn read(&mut self, _buf: &mut [u8]) -> Result<usize>
source
fn read(&mut self, _buf: &mut [u8]) -> Result<usize>
sourcePull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
fn read_buf(&mut self, _buf: &mut ReadBuf<'_>) -> Result<()>
source
fn read_buf(&mut self, _buf: &mut ReadBuf<'_>) -> Result<()>
sourcePull some bytes from this source into the specified buffer. Read more
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
1.36.0 · source
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
1.36.0 · sourceLike read, except that it reads into a slice of buffers. Read more
fn is_read_vectored(&self) -> bool
source
fn is_read_vectored(&self) -> bool
sourceDetermines if this Reader has an efficient read_vectored
implementation. Read more
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
source
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
sourceRead all bytes until EOF in this source, placing them into buf. Read more
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
source
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
sourceRead all bytes until EOF in this source, appending them to buf. Read more
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
1.6.0 · source
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
1.6.0 · sourceRead the exact number of bytes required to fill buf. Read more
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<()>
source
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<()>
sourceRead the exact number of bytes required to fill buf. Read more
fn by_ref(&mut self) -> &mut Self where
Self: Sized,
source
fn by_ref(&mut self) -> &mut Self where
Self: Sized,
sourceCreates a “by reference” adaptor for this instance of Read. Read more
fn bytes(self) -> Bytes<Self>ⓘNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>; where
Self: Sized,
source
fn bytes(self) -> Bytes<Self>ⓘNotable traits for Bytes<R>impl<R: Read> Iterator for Bytes<R> type Item = Result<u8>; where
Self: Sized,
sourceimpl Seek for Empty
1.51.0 · source
impl Seek for Empty
1.51.0 · sourcefn seek(&mut self, _pos: SeekFrom) -> Result<u64>
source
fn seek(&mut self, _pos: SeekFrom) -> Result<u64>
sourceSeek to an offset, in bytes, in a stream. Read more
fn stream_len(&mut self) -> Result<u64>
source
fn stream_len(&mut self) -> Result<u64>
sourceReturns the length of this stream (in bytes). Read more
fn stream_position(&mut self) -> Result<u64>
source
fn stream_position(&mut self) -> Result<u64>
sourceReturns the current seek position from the start of the stream. Read more
impl Copy for Empty
sourceAuto Trait Implementations
impl RefUnwindSafe for Empty
impl Send for Empty
impl Sync for Empty
impl Unpin for Empty
impl UnwindSafe for Empty
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more