pub struct ReadMessageState { /* private fields */ }
Expand description
An object for managing the state of an async channel read message operation that can be used to implement futures.
Implementations§
Source§impl ReadMessageState
impl ReadMessageState
Sourcepub unsafe fn new(channel: &DriverHandle) -> Self
pub unsafe fn new(channel: &DriverHandle) -> Self
Creates a new raw read message state that can be used to implement a [Future
] that reads
data from a channel and then converts it to the appropriate type. It also allows for
different ways of storing and managing the dispatcher we wait on by deferring the
dispatcher used to poll time.
§Safety
The caller is responsible for ensuring that channel
outlives this object.
Sourcepub fn poll_with_dispatcher<D: OnDispatcher>(
&mut self,
cx: &mut Context<'_>,
dispatcher: D,
) -> Poll<Result<Option<Message<[MaybeUninit<u8>]>>, Status>>
pub fn poll_with_dispatcher<D: OnDispatcher>( &mut self, cx: &mut Context<'_>, dispatcher: D, ) -> Poll<Result<Option<Message<[MaybeUninit<u8>]>>, Status>>
Polls this channel read operation against the given dispatcher.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadMessageState
impl RefUnwindSafe for ReadMessageState
impl Send for ReadMessageState
impl Sync for ReadMessageState
impl Unpin for ReadMessageState
impl UnwindSafe for ReadMessageState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more