pub struct RunnableConfig {
pub tags: Vec<String>,
pub metadata: HashMap<String, Value>,
pub max_concurrency: Option<usize>,
pub run_id: Option<Uuid>,
pub run_name: Option<String>,
pub callbacks: Option<Arc<CallbackManager>>,
pub cancellation_token: Option<CancellationToken>,
}Expand description
Runnable execution configuration.
Fields§
Tags for filtering and tracking.
metadata: HashMap<String, Value>Metadata - custom data (JSON serializable).
max_concurrency: Option<usize>Max concurrency for batch operations.
run_id: Option<Uuid>Run ID for tracking.
run_name: Option<String>Run name for debugging.
callbacks: Option<Arc<CallbackManager>>Callback manager for tracing and monitoring.
cancellation_token: Option<CancellationToken>Cancellation token for aborting long-running operations.
Implementations§
Source§impl RunnableConfig
impl RunnableConfig
Sourcepub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
Adds metadata.
Sourcepub fn with_max_concurrency(self, max: usize) -> Self
pub fn with_max_concurrency(self, max: usize) -> Self
Sets max concurrency.
Sourcepub fn with_run_id(self, id: Uuid) -> Self
pub fn with_run_id(self, id: Uuid) -> Self
Sets run ID.
Sourcepub fn with_run_name(self, name: impl Into<String>) -> Self
pub fn with_run_name(self, name: impl Into<String>) -> Self
Sets run name.
Sourcepub fn with_callbacks(self, callbacks: Arc<CallbackManager>) -> Self
pub fn with_callbacks(self, callbacks: Arc<CallbackManager>) -> Self
Sets callback manager.
Sourcepub fn with_cancellation_token(self, token: CancellationToken) -> Self
pub fn with_cancellation_token(self, token: CancellationToken) -> Self
Sets cancellation token.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Checks if cancellation has been requested.
Sourcepub fn merge(self, other: RunnableConfig) -> Self
pub fn merge(self, other: RunnableConfig) -> Self
Merges two configurations (later overrides earlier).
Trait Implementations§
Source§impl Clone for RunnableConfig
impl Clone for RunnableConfig
Source§fn clone(&self) -> RunnableConfig
fn clone(&self) -> RunnableConfig
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 RunnableConfig
impl Debug for RunnableConfig
Source§impl Default for RunnableConfig
impl Default for RunnableConfig
Source§fn default() -> RunnableConfig
fn default() -> RunnableConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RunnableConfig
impl !UnwindSafe for RunnableConfig
impl Freeze for RunnableConfig
impl Send for RunnableConfig
impl Sync for RunnableConfig
impl Unpin for RunnableConfig
impl UnsafeUnpin for RunnableConfig
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