pub struct ExecutionContext {
pub cancellation_token: Option<CancellationToken>,
pub event_handler: Option<RunEventHandler>,
pub checkpoint_store: Option<Arc<dyn CheckpointStore>>,
pub approval_provider: Option<Arc<dyn ApprovalProvider>>,
pub approval_broker: Option<ApprovalBroker>,
pub approval_timeout: Option<Duration>,
pub memory_providers: Vec<Arc<dyn MemoryProvider>>,
pub app_state: Option<Arc<dyn Any + Send + Sync>>,
pub metadata: BTreeMap<String, Value>,
/* private fields */
}Fields§
§cancellation_token: Option<CancellationToken>§event_handler: Option<RunEventHandler>§checkpoint_store: Option<Arc<dyn CheckpointStore>>§approval_provider: Option<Arc<dyn ApprovalProvider>>§approval_broker: Option<ApprovalBroker>§approval_timeout: Option<Duration>§memory_providers: Vec<Arc<dyn MemoryProvider>>§app_state: Option<Arc<dyn Any + Send + Sync>>§metadata: BTreeMap<String, Value>Implementations§
Source§impl ExecutionContext
impl ExecutionContext
pub fn with_cancellation_token( self, cancellation_token: CancellationToken, ) -> Self
pub fn with_event_handler(self, event_handler: RunEventHandler) -> Self
pub fn with_checkpoint_store( self, checkpoint_store: Arc<dyn CheckpointStore>, ) -> Self
pub fn with_approval_provider(self, provider: Arc<dyn ApprovalProvider>) -> Self
pub fn with_approval_broker(self, broker: ApprovalBroker) -> Self
pub fn with_approval_timeout(self, timeout: Duration) -> Self
pub fn with_memory_provider(self, provider: Arc<dyn MemoryProvider>) -> Self
pub fn with_app_state<T>(self, app_state: T) -> Self
pub fn with_app_state_arc(self, app_state: Arc<dyn Any + Send + Sync>) -> Self
pub fn with_metadata(self, metadata: BTreeMap<String, Value>) -> Self
pub fn check_cancelled(&self) -> Result<(), CancelledError>
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Source§impl Default for ExecutionContext
impl Default for ExecutionContext
Source§fn default() -> ExecutionContext
fn default() -> ExecutionContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionContext
impl !UnwindSafe for ExecutionContext
impl Freeze for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.