pub struct RwLockReadGuard<T: AsOpenFile> { /* private fields */ }
Expand description
Implementations§
Trait Implementations§
Source§impl<T: AsOpenFile + AsyncBufRead> AsyncBufRead for RwLockReadGuard<T>
impl<T: AsOpenFile + AsyncBufRead> AsyncBufRead for RwLockReadGuard<T>
Source§impl<T: AsOpenFile + AsyncRead> AsyncRead for RwLockReadGuard<T>
Delegate AsyncRead
to the inner file.
impl<T: AsOpenFile + AsyncRead> AsyncRead for RwLockReadGuard<T>
Delegate AsyncRead
to the inner file.
Source§impl<T: AsOpenFile + AsyncSeek> AsyncSeek for RwLockReadGuard<T>
impl<T: AsOpenFile + AsyncSeek> AsyncSeek for RwLockReadGuard<T>
Source§impl<T: AsOpenFile + BufRead> BufRead for RwLockReadGuard<T>
impl<T: AsOpenFile + BufRead> BufRead for RwLockReadGuard<T>
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, via
Read
methods, if empty. Read moreSource§fn consume(&mut self, amt: usize)
fn consume(&mut self, amt: 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 read_line(&mut self, buf: &mut String) -> Result<usize>
fn read_line(&mut self, buf: &mut String) -> Result<usize>
Reads all bytes until a newline (the
0xA
byte) is reached, and append
them to the provided String
buffer. 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 more1.83.0 · Source§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§impl<T: Debug + AsOpenFile> Debug for RwLockReadGuard<T>
impl<T: Debug + AsOpenFile> Debug for RwLockReadGuard<T>
Source§impl<T: AsOpenFile> Drop for RwLockReadGuard<T>
impl<T: AsOpenFile> Drop for RwLockReadGuard<T>
Source§impl<T: AsOpenFile + Read> Read for RwLockReadGuard<T>
Delegate Read
to the inner file.
impl<T: AsOpenFile + Read> Read for RwLockReadGuard<T>
Delegate Read
to the inner file.
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_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 read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
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>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Reads all bytes until EOF in this source, appending them to
buf
. Read moreSource§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Reads the exact number of bytes required to fill
buf
. 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 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_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: 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_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§impl<T: AsOpenFile + Seek> Seek for RwLockReadGuard<T>
impl<T: AsOpenFile + Seek> Seek for RwLockReadGuard<T>
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_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<'pin, T: AsOpenFile> Unpin for RwLockReadGuard<T>where
PinnedFieldsOf<__RwLockReadGuard<'pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for RwLockReadGuard<T>where
T: Freeze,
impl<T> RefUnwindSafe for RwLockReadGuard<T>where
T: RefUnwindSafe,
impl<T> Send for RwLockReadGuard<T>where
T: Send,
impl<T> Sync for RwLockReadGuard<T>where
T: Sync,
impl<T> UnwindSafe for RwLockReadGuard<T>where
T: UnwindSafe,
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