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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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