Struct ResourceInvocationScope
pub struct ResourceInvocationScope { /* private fields */ }Expand description
Immutable job custody, constructed only from an actual admitted invocation and the exact mounted record owner. InvocationId alone cannot construct it.
Implementations§
§impl ResourceInvocationScope
impl ResourceInvocationScope
pub fn locus_basis(&self) -> Result<Option<InvocationLocusBasis>, String>
pub fn locus_basis(&self) -> Result<Option<InvocationLocusBasis>, String>
Read the immutable pre-execution observation while original custody is live. No basis means this invocation could not be observed truthfully. This never commits, borrows a document, refreshes timestamps or executes.
pub fn invocation(&self) -> InvocationId
pub fn approved_check(
&self,
check_id: &str,
) -> Result<Pin<Box<dyn Future<Output = Result<Receipt, String>> + Send>>, String>
pub fn approved_check( &self, check_id: &str, ) -> Result<Pin<Box<dyn Future<Output = Result<Receipt, String>> + Send>>, String>
Queue only a check ID under this exact admitted effect’s record route. The host resolves commands and execution bounds and rechecks custody.
§Errors
Refuses absent transport, changed custody, malformed IDs or a full lane.
pub fn approved_check_reported(
&self,
check_id: &str,
) -> Result<Box<dyn FnOnce(Box<dyn Fn(ReportObservation) -> Result<(), String> + Send>) -> Pin<Box<dyn Future<Output = Result<Receipt, String>> + Send>> + Send>, String>
pub fn approved_check_reported( &self, check_id: &str, ) -> Result<Box<dyn FnOnce(Box<dyn Fn(ReportObservation) -> Result<(), String> + Send>) -> Pin<Box<dyn Future<Output = Result<Receipt, String>> + Send>> + Send>, String>
Queue reported observations on the same admitted check and record channel.
§Errors
Refuses changed custody, unavailable transport, malformed IDs or a full lane.
pub fn cancel(&self)
pub fn cancel(&self)
Irreversibly retire this job and all derived worker-effect custody. Cancellation grants no authority and cannot affect another job.
pub fn check(&self) -> Result<(), String>
pub fn check(&self) -> Result<(), String>
Check the original caller and the actual mounted owner’s lifetime.
pub fn with_effect<R>(
&self,
effect: impl FnOnce() -> Result<R, String>,
) -> Result<R, String>
pub fn with_effect<R>( &self, effect: impl FnOnce() -> Result<R, String>, ) -> Result<R, String>
A delayed job must enter this callback immediately before its effect.
pub fn effect_scope(&self) -> Result<ResourceEffectScope, String>
pub fn effect_scope(&self) -> Result<ResourceEffectScope, String>
Derive worker-thread effect custody from this actual admitted scope. The host’s original lease checks exact worker/origin liveness and current caller permission. This carries no record loan and cannot mutate a Doc.
pub fn with_document_mutation<R>(
&self,
document: &mut AutoCommit,
mutate: impl FnOnce(&mut AutoCommit) -> Result<R, String>,
) -> Result<R, String>
pub fn with_document_mutation<R>( &self, document: &mut AutoCommit, mutate: impl FnOnce(&mut AutoCommit) -> Result<R, String>, ) -> Result<R, String>
Mutate only the actual currently borrowed canonical record. The loan witness identifies storage; this explicit scope supplies caller custody. Partial changes on an Err retain their original contribution as well.
Trait Implementations§
§impl Clone for ResourceInvocationScope
impl Clone for ResourceInvocationScope
§fn clone(&self) -> ResourceInvocationScope
fn clone(&self) -> ResourceInvocationScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResourceInvocationScope
impl !RefUnwindSafe for ResourceInvocationScope
impl !Send for ResourceInvocationScope
impl !Sync for ResourceInvocationScope
impl Unpin for ResourceInvocationScope
impl UnsafeUnpin for ResourceInvocationScope
impl !UnwindSafe for ResourceInvocationScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more