pub struct ExecutionContext {
pub cancellation_token: Option<CancellationToken>,
pub stream_callback: Option<StreamCallback>,
pub state_store: Option<Arc<dyn StateStore>>,
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 metadata: BTreeMap<String, Value>,
}Fields§
§cancellation_token: Option<CancellationToken>§stream_callback: Option<StreamCallback>§state_store: Option<Arc<dyn StateStore>>§approval_provider: Option<Arc<dyn ApprovalProvider>>§approval_broker: Option<ApprovalBroker>§approval_timeout: Option<Duration>§memory_providers: Vec<Arc<dyn MemoryProvider>>§metadata: BTreeMap<String, Value>Implementations§
Source§impl ExecutionContext
impl ExecutionContext
pub fn with_cancellation_token( self, cancellation_token: CancellationToken, ) -> Self
pub fn with_stream_callback(self, stream_callback: StreamCallback) -> Self
pub fn with_state_store(self, state_store: Arc<dyn StateStore>) -> 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_metadata(self, metadata: BTreeMap<String, Value>) -> Self
pub fn check_cancelled(&self) -> Result<(), String>
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 Freeze for ExecutionContext
impl !RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl !UnwindSafe 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.