pub struct DynamicReader<'p> { /* private fields */ }
Expand description
Read-only access to a [DynamicPipe
].
Implementations§
Source§impl<'p> DynamicReader<'p>
impl<'p> DynamicReader<'p>
Sourcepub fn read<'a>(&'a self, buf: &'a mut [u8]) -> DynamicReadFuture<'a> ⓘ
pub fn read<'a>(&'a self, buf: &'a mut [u8]) -> DynamicReadFuture<'a> ⓘ
Read some bytes from the pipe.
See Pipe::read()
Sourcepub fn try_read(&self, buf: &mut [u8]) -> Result<usize, TryReadError>
pub fn try_read(&self, buf: &mut [u8]) -> Result<usize, TryReadError>
Attempt to immediately read some bytes from the pipe.
See Pipe::try_read()
Sourcepub fn fill_buf(&mut self) -> DynamicFillBufFuture<'_> ⓘ
pub fn fill_buf(&mut self) -> DynamicFillBufFuture<'_> ⓘ
Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.
If no bytes are currently available to read, this function waits until at least one byte is available.
If the reader is at end-of-file (EOF), an empty slice is returned.
Sourcepub fn try_fill_buf(&mut self) -> Result<&[u8], TryReadError>
pub fn try_fill_buf(&mut self) -> Result<&[u8], TryReadError>
Try returning contents of the internal buffer.
If no bytes are currently available to read, this function returns Err(TryReadError::Empty)
.
If the reader is at end-of-file (EOF), an empty slice is returned.
Trait Implementations§
Auto Trait Implementations§
impl<'p> Freeze for DynamicReader<'p>
impl<'p> !RefUnwindSafe for DynamicReader<'p>
impl<'p> !Send for DynamicReader<'p>
impl<'p> !Sync for DynamicReader<'p>
impl<'p> Unpin for DynamicReader<'p>
impl<'p> !UnwindSafe for DynamicReader<'p>
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