#[non_exhaustive]#[repr(transparent)]pub struct Context<'a, 'd> {
pub storage: Context<'a, 'd>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.storage: Context<'a, 'd>Implementations§
Source§impl<'a, 'd> Context<'a, 'd>
impl<'a, 'd> Context<'a, 'd>
Sourcepub fn rejected(&mut self, failure: Failure)
pub fn rejected(&mut self, failure: Failure)
Reports one exact cancellation rejection to this scope’s mandatory observer.
Sourcepub fn accept_error(
&mut self,
target: Erased<'d, Accept>,
cause: Failure,
flow: Flow,
)
pub fn accept_error( &mut self, target: Erased<'d, Accept>, cause: Failure, flow: Flow, )
Reports a consumed accept failure with its original driver-bound target.
Sourcepub fn retire(&mut self, event: Event<'d>) -> ControlFlow<Event<'d>>
pub fn retire(&mut self, event: Event<'d>) -> ControlFlow<Event<'d>>
Reclaims a terminal routed receive and reports its original target and outcome.
Sourcepub fn reclaim(&mut self, done: Completion<'d>)
pub fn reclaim(&mut self, done: Completion<'d>)
Consumes one routed receive, releases its owner, and reports the exact result.
pub fn reborrow(&mut self) -> Context<'_, 'd>
pub fn region_token(&mut self) -> &mut Token<Identity<'d>>
pub fn state_token(&mut self) -> &mut Token<Identity<'d, 1>>
pub fn into_regions( self, ) -> &'a mut (Token<Identity<'d>>, Token<Identity<'d, 1>>)
pub fn regions(&self) -> &(Token<Identity<'d>>, Token<Identity<'d, 1>>)
pub fn receive(&self) -> Receive
pub fn driver_ref(&self) -> Reference<'d>
Source§impl<'a, 'd> Context<'a, 'd>
impl<'a, 'd> Context<'a, 'd>
pub fn dispatch( &mut self, work: Reactor<'_, 'd>, emit: impl FnMut(Event<'d>, &mut Self) -> ControlFlow<Event<'d>>, ) -> Dispatch<'d>
pub fn commit(&mut self, work: Reactor<'_, 'd>) -> Result<Commit, Error>
pub fn wait( &mut self, work: Reactor<'_, 'd>, timeout: Option<Duration>, ) -> Result<(), Error>
Auto Trait Implementations§
impl<'a, 'd> !RefUnwindSafe for Context<'a, 'd>
impl<'a, 'd> !Send for Context<'a, 'd>
impl<'a, 'd> !Sync for Context<'a, 'd>
impl<'a, 'd> !UnwindSafe for Context<'a, 'd>
impl<'a, 'd> Freeze for Context<'a, 'd>
impl<'a, 'd> Unpin for Context<'a, 'd>
impl<'a, 'd> UnsafeUnpin for Context<'a, 'd>
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