Trait fuchsia_async::FifoReadable
source · pub trait FifoReadable<R: FifoEntry>where
Self: Sized,{
// Required method
fn read<B: ?Sized + FifoReadBuffer<R>>(
&self,
cx: &mut Context<'_>,
entries: &mut B,
) -> Poll<Result<usize, Status>>;
// Provided methods
fn read_entries<'a, B: ?Sized + FifoReadBuffer<R>>(
&'a self,
entries: &'a mut B,
) -> ReadEntries<'a, Self, B, R> ⓘ { ... }
fn read_entry<'a>(&'a self) -> ReadOne<'a, Self, R> ⓘ { ... }
fn read_one(&self, cx: &mut Context<'_>) -> Poll<Result<R, Status>> { ... }
}
Expand description
Identifies that the object may be used to read entries from a FIFO.
Required Methods§
Provided Methods§
sourcefn read_entries<'a, B: ?Sized + FifoReadBuffer<R>>(
&'a self,
entries: &'a mut B,
) -> ReadEntries<'a, Self, B, R> ⓘ
fn read_entries<'a, B: ?Sized + FifoReadBuffer<R>>( &'a self, entries: &'a mut B, ) -> ReadEntries<'a, Self, B, R> ⓘ
Creates a future that receives entries into entries
.
The returned future will return after the FIFO becomes readable and up
to entries.len()
has been received. The future will resolve to the
number of elements written into entries
.
sourcefn read_entry<'a>(&'a self) -> ReadOne<'a, Self, R> ⓘ
fn read_entry<'a>(&'a self) -> ReadOne<'a, Self, R> ⓘ
Creates a future that receives a single entry.
The returned future will return after the FIFO becomes readable and a single entry is available.
Object Safety§
This trait is not object safe.