Skip to main content

Context

Struct Context 

Source
pub struct Context<'a, 'owner, 'd: 'owner> { /* private fields */ }
Expand description

Driver access carrying retained-owner authority with the same representation as driver::Context. Submitting borrowed storage still requires the exact resource-retention proof documented at each raw submission boundary.

Implementations§

Source§

impl<'a, 'owner, 'd: 'owner> Context<'a, 'owner, 'd>

Source

pub fn new(driver: Context<'a, 'd>, owner: Owner<'owner, 'd>) -> Self

Joins driver access with a validated owner proof.

Source

pub fn reborrow(&mut self) -> Context<'_, 'owner, 'd>

Source

pub fn driver(&mut self) -> &mut Context<'a, 'd>

Source

pub fn into_driver(self) -> Context<'a, 'd>

Drops the owner proof while preserving the exact driver turn.

Methods from Deref<Target = Context<'a, 'd>>§

Source

pub fn rejected(&mut self, failure: Failure)

Reports one exact cancellation rejection to this scope’s mandatory observer.

Source

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.

Source

pub fn retire(&mut self, event: Event<'d>) -> ControlFlow<Event<'d>>

Reclaims a terminal routed receive and reports its original target and outcome.

Source

pub fn reclaim(&mut self, done: Completion<'d>)

Consumes one routed receive, releases its owner, and reports the exact result.

Source

pub fn reborrow(&mut self) -> Context<'_, 'd>

Source

pub fn region_token(&mut self) -> &mut Token<Identity<'d>>

Source

pub fn state_token(&mut self) -> &mut Token<Identity<'d, 1>>

Source

pub fn regions(&self) -> &(Token<Identity<'d>>, Token<Identity<'d, 1>>)

Source

pub fn receive(&self) -> Receive

Source

pub fn driver_ref(&self) -> Reference<'d>

Source

pub fn dispatch( &mut self, work: Reactor<'_, 'd>, emit: impl FnMut(Event<'d>, &mut Self) -> ControlFlow<Event<'d>>, ) -> Dispatch<'d>

Source

pub fn commit(&mut self, work: Reactor<'_, 'd>) -> Result<Commit, Error>

Source

pub fn wait( &mut self, work: Reactor<'_, 'd>, timeout: Option<Duration>, ) -> Result<(), Error>

Trait Implementations§

Source§

impl<'a, 'owner, 'd: 'owner> Deref for Context<'a, 'owner, 'd>

Source§

type Target = Context<'a, 'd>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'a, 'owner, 'd: 'owner> DerefMut for Context<'a, 'owner, 'd>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'a, 'owner, 'd> !RefUnwindSafe for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> !Send for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> !Sync for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> !UnwindSafe for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> Freeze for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> Unpin for Context<'a, 'owner, 'd>

§

impl<'a, 'owner, 'd> UnsafeUnpin for Context<'a, 'owner, 'd>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Convert<T> for T

Source§

fn into(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.