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
impl ExecutionLease
Sourcepub fn source_resource_context(
&self,
) -> Result<Option<SourceResourceContext>, ExecutionLeaseError>
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.
pub fn source_stop_handle( &self, ) -> Result<Option<SourceStopHandle>, ExecutionLeaseError>
pub fn id(&self) -> ExecutionLeaseId
pub fn identity(&self) -> ExecutionIdentity
Sourcepub fn begin_synchronous_work(
&mut self,
current: ExecutionIdentity,
) -> Result<ExecutionWork<'_>, ExecutionLeaseError>
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.
Sourcepub fn validate(
&self,
current: ExecutionIdentity,
) -> Result<(), ExecutionLeaseError>
pub fn validate( &self, current: ExecutionIdentity, ) -> Result<(), ExecutionLeaseError>
Supply the owner’s freshly read identity, never a cached ticket value.