Struct embassy_sync::pipe::Writer
source · pub struct Writer<'p, M, const N: usize>where
M: RawMutex,{ /* private fields */ }
Expand description
Write-only access to a Pipe
.
Implementations§
source§impl<'p, M, const N: usize> Writer<'p, M, N>where
M: RawMutex,
impl<'p, M, const N: usize> Writer<'p, M, N>where
M: RawMutex,
sourcepub fn write<'a>(&'a self, buf: &'a [u8]) -> WriteFuture<'a, M, N> ⓘ
pub fn write<'a>(&'a self, buf: &'a [u8]) -> WriteFuture<'a, M, N> ⓘ
Write some bytes to the pipe.
See Pipe::write()
sourcepub fn try_write(&self, buf: &[u8]) -> Result<usize, TryWriteError>
pub fn try_write(&self, buf: &[u8]) -> Result<usize, TryWriteError>
Attempt to immediately write some bytes to the pipe.
Trait Implementations§
source§impl<M: RawMutex, const N: usize> Write for Writer<'_, M, N>
impl<M: RawMutex, const N: usize> Write for Writer<'_, M, N>
source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more