pub struct Reader<'p, M, const N: usize>where
M: RawMutex,{ /* private fields */ }Expand description
Read-only access to a Pipe.
Implementations§
Source§impl<'p, M, const N: usize> Reader<'p, M, N>where
M: RawMutex,
impl<'p, M, const N: usize> Reader<'p, M, N>where
M: RawMutex,
Sourcepub fn read<'a>(&'a self, buf: &'a mut [u8]) -> ReadFuture<'a, M, N> ⓘ
pub fn read<'a>(&'a self, buf: &'a mut [u8]) -> ReadFuture<'a, M, N> ⓘ
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()
Trait Implementations§
Source§impl<M: RawMutex, const N: usize> Io for Reader<'_, M, N>
impl<M: RawMutex, const N: usize> Io for Reader<'_, M, N>
Source§type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
Source§impl<M: RawMutex, const N: usize> Read for Reader<'_, M, N>
impl<M: RawMutex, const N: usize> Read for Reader<'_, M, N>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Pull some bytes from this source into the specified buffer, returning how many bytes were read.
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf.impl<'p, M, const N: usize> Copy for Reader<'p, M, N>
Auto Trait Implementations§
impl<'p, M, const N: usize> Freeze for Reader<'p, M, N>
impl<'p, M, const N: usize> !RefUnwindSafe for Reader<'p, M, N>
impl<'p, M, const N: usize> Send for Reader<'p, M, N>where
M: Sync,
impl<'p, M, const N: usize> Sync for Reader<'p, M, N>where
M: Sync,
impl<'p, M, const N: usize> Unpin for Reader<'p, M, N>
impl<'p, M, const N: usize> !UnwindSafe for Reader<'p, M, N>
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