#[non_exhaustive]pub struct Context<'a> { /* private fields */ }Expand description
Per-invocation context. Borrowed view; not stored across calls.
Implementations§
Source§impl<'a> Context<'a>
impl<'a> Context<'a>
Sourcepub fn stop_executor(&self)
pub fn stop_executor(&self)
Request the enclosing executor to stop.
Sourcepub fn stoppable(&self) -> Stoppable
pub fn stoppable(&self) -> Stoppable
Get a clonable Stoppable handle that other threads may hold.
Sourcepub fn send_event(&self, ev: UserEvent)
pub fn send_event(&self, ev: UserEvent)
Forward a user event to the observer (no-op if no observer is configured).
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
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