#[non_exhaustive]pub struct Empty;
Expand description
Trait Implementationsยง
1.0.0 ยท Sourceยงimpl BufRead for Empty
impl BufRead for Empty
Sourceยงfn fill_buf(&mut self) -> Result<&[u8], Error>
fn fill_buf(&mut self) -> Result<&[u8], Error>
Returns the contents of the internal buffer, filling it with more data, via
Read
methods, if empty. Read moreSourceยง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. Read moreSourceยงfn has_data_left(&mut self) -> Result<bool, Error>
fn has_data_left(&mut self) -> Result<bool, Error>
๐ฌThis is a nightly-only experimental API. (
buf_read_has_data_left
)Checks if there is any data left to be
read
. Read moreSourceยงfn skip_until(&mut self, _byte: u8) -> Result<usize, Error>
fn skip_until(&mut self, _byte: u8) -> Result<usize, Error>
Skips all bytes until the delimiter
byte
or EOF is reached. Read moreSourceยงfn read_line(&mut self, _buf: &mut String) -> Result<usize, Error>
fn read_line(&mut self, _buf: &mut String) -> Result<usize, Error>
Reads all bytes until a newline (the
0xA
byte) is reached, and append
them to the provided String
buffer. Read more1.0.0 ยท Sourceยงimpl Read for Empty
impl Read for Empty
Sourceยงfn read(&mut self, _buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, _buf: &mut [u8]) -> Result<usize, Error>
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<(), Error>
fn read_buf(&mut self, _cursor: BorrowedCursor<'_>) -> Result<(), Error>
๐ฌThis is a nightly-only experimental API. (
read_buf
)Pull some bytes from this source into the specified buffer. Read more
Sourceยงfn read_vectored(
&mut self,
_bufs: &mut [IoSliceMut<'_>],
) -> Result<usize, Error>
fn read_vectored( &mut self, _bufs: &mut [IoSliceMut<'_>], ) -> Result<usize, Error>
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
)Sourceยงfn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Reads the exact number of bytes required to fill
buf
. Read moreSourceยงfn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
๐ฌThis is a nightly-only experimental API. (
read_buf
)Reads the exact number of bytes required to fill
cursor
. Read moreSourceยงfn read_to_end(&mut self, _buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, _buf: &mut Vec<u8>) -> Result<usize, Error>
Reads all bytes until EOF in this source, placing them into
buf
. Read moreSourceยงfn read_to_string(&mut self, _buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, _buf: &mut String) -> Result<usize, Error>
Reads all bytes until EOF in this source, appending them to
buf
. Read more1.0.0 ยท Sourceยง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, Error>
fn seek(&mut self, _pos: SeekFrom) -> Result<u64, Error>
Seek to an offset, in bytes, in a stream. Read more
Sourceยงfn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
๐ฌThis is a nightly-only experimental API. (
seek_stream_len
)Returns the length of this stream (in bytes). Read more
Sourceยงfn stream_position(&mut self) -> Result<u64, Error>
fn stream_position(&mut self) -> Result<u64, Error>
Returns the current seek position from the start of the stream. Read more
1.73.0 ยท Sourceยงimpl Write for &Empty
impl Write for &Empty
Sourceยงfn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Writes a buffer into this writer, returning how many bytes were written. Read more
Sourceยงfn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
๐ฌThis is a nightly-only experimental API. (
can_vector
)Sourceยงfn write_all(&mut self, _buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, _buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Sourceยงfn write_all_vectored(&mut self, _bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, _bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
๐ฌThis is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Sourceยงfn write_fmt(&mut self, _args: Arguments<'_>) -> Result<(), Error>
fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<(), Error>
Writes a formatted string into this writer, returning any error
encountered. Read more
1.73.0 ยท Sourceยงimpl Write for Empty
impl Write for Empty
Sourceยงfn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Writes a buffer into this writer, returning how many bytes were written. Read more
Sourceยงfn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
๐ฌThis is a nightly-only experimental API. (
can_vector
)Sourceยงfn write_all(&mut self, _buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, _buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Sourceยงfn write_all_vectored(&mut self, _bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, _bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
๐ฌThis is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Sourceยงfn write_fmt(&mut self, _args: Arguments<'_>) -> Result<(), Error>
fn write_fmt(&mut self, _args: Arguments<'_>) -> Result<(), Error>
Writes a formatted string into this writer, returning any error
encountered. Read more
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 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