ExecutionLease

Struct ExecutionLease 

Source
pub struct ExecutionLease { /* private fields */ }
Expand description

Exclusive product reservation. Send, not Clone: no borrow or thread-bound guard survives a poll. Drop releases admission on normal/error/panic paths. This does not prohibit direct router calls: the executor must keep those calls within its product owner while the reservation is live.

Implementations§

Source§

impl ExecutionLease

Source

pub fn source_resource_context( &self, ) -> Result<Option<SourceResourceContext>, ExecutionLeaseError>

Read only an active source-borrow resource context. This does not install any execution state or grant a router lease on another thread.

Source

pub fn source_stop_handle( &self, ) -> Result<Option<SourceStopHandle>, ExecutionLeaseError>

Source

pub fn id(&self) -> ExecutionLeaseId

Source

pub fn identity(&self) -> ExecutionIdentity

Source

pub fn begin_synchronous_work( &mut self, current: ExecutionIdentity, ) -> Result<ExecutionWork<'_>, ExecutionLeaseError>

Begin trusted synchronous executor work after validating its current owner. Only this scope may acknowledge configuration/cache mutations made by existing callbacks. Acceptance of a reply must use validate instead; reply-supplied identities cannot authorize a refresh.

Source

pub fn validate( &self, current: ExecutionIdentity, ) -> Result<(), ExecutionLeaseError>

Supply the owner’s freshly read identity, never a cached ticket value.

Trait Implementations§

Source§

impl Debug for ExecutionLease

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ExecutionLease

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

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> 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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.