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
impl<'p, M, const N: usize> Copy for Writer<'p, M, N>where
M: RawMutex,
Auto Trait Implementations§
impl<'p, M, const N: usize> Freeze for Writer<'p, M, N>
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)