Struct embassy_sync::pipe::Writer
source · [−]Expand description
Write-only access to a Pipe
.
Implementations
sourceimpl<'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>ⓘNotable traits for WriteFuture<'p, M, N>impl<'p, M, const N: usize> Future for WriteFuture<'p, M, N>where
M: RawMutex, type Output = usize;
pub fn write<'a>(&'a self, buf: &'a [u8]) -> WriteFuture<'a, M, N>ⓘNotable traits for WriteFuture<'p, M, N>impl<'p, M, const N: usize> Future for WriteFuture<'p, M, N>where
M: RawMutex, type Output = usize;
M: RawMutex, type Output = usize;
Writes a value.
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 a message.
See Pipe::write()
Trait Implementations
sourceimpl<M: RawMutex, const N: usize> Io for Writer<'_, M, N>
impl<M: RawMutex, const N: usize> Io for Writer<'_, M, N>
type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
sourceimpl<M: RawMutex, const N: usize> Write for Writer<'_, M, N>
impl<M: RawMutex, const N: usize> Write for Writer<'_, M, N>
type WriteFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <Writer<'_, M, N> as Io>::Error>> + 'a
type WriteFuture<'a>
where
Self: 'a = impl Future<Output = Result<usize, <Writer<'_, M, N> as Io>::Error>> + 'a
Future returned by
write
.sourcefn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>
fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>
Write a buffer into this writer, returning how many bytes were written.
type FlushFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Writer<'_, M, N> as Io>::Error>> + 'a
type FlushFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Writer<'_, M, N> as Io>::Error>> + 'a
Future returned by
flush
.sourcefn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
impl<'p, M: Copy, const N: usize> Copy for Writer<'p, M, N>where
M: RawMutex,
Auto Trait Implementations
impl<'p, M, const N: usize> !RefUnwindSafe for Writer<'p, M, N>
impl<'p, M, const N: usize> Send for Writer<'p, M, N>where
M: Sync,
impl<'p, M, const N: usize> Sync for Writer<'p, M, N>where
M: Sync,
impl<'p, M, const N: usize> Unpin for Writer<'p, M, N>
impl<'p, M, const N: usize> !UnwindSafe for Writer<'p, M, N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more