fuchsia_async

Trait FifoWritable

Source
pub trait FifoWritable<W: FifoEntry>
where Self: Sized,
{ // Required method fn write<B: ?Sized + FifoWriteBuffer<W>>( &self, cx: &mut Context<'_>, entries: &B, ) -> Poll<Result<usize, Status>>; // Provided method fn write_entries<'a, B: ?Sized + FifoWriteBuffer<W>>( &'a self, entries: &'a B, ) -> WriteEntries<'a, Self, B, W> { ... } }
Expand description

Identifies that the object may be used to write entries into a FIFO.

Required Methods§

Source

fn write<B: ?Sized + FifoWriteBuffer<W>>( &self, cx: &mut Context<'_>, entries: &B, ) -> Poll<Result<usize, Status>>

Writes entries to the fifo and registers this Fifo as needing a write on receiving a zx::Status::SHOULD_WAIT.

Returns the number of elements processed.

Provided Methods§

Source

fn write_entries<'a, B: ?Sized + FifoWriteBuffer<W>>( &'a self, entries: &'a B, ) -> WriteEntries<'a, Self, B, W>

Creates a future that transmits entries to be written.

The returned future will return after an entry has been received on this fifo. The future will resolve to the fifo once all elements have been transmitted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: FifoEntry, W: FifoEntry> FifoWritable<W> for Fifo<R, W>