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.
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.