pub struct RunnableConfig {
pub tags: Vec<String>,
pub metadata: HashMap<String, Value>,
pub debug: bool,
pub verbose: bool,
pub callbacks: Vec<Arc<dyn CallbackHandler>>,
}
Expand description
Configuration for running a Runnable
Fields§
Tags for this run
metadata: HashMap<String, Value>
Metadata for this run
debug: bool
Whether to run in debug mode
verbose: bool
Whether to run in verbose mode
callbacks: Vec<Arc<dyn CallbackHandler>>
Callback handlers for this run
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
Add metadata to the configuration
Sourcepub fn with_debug(self, debug: bool) -> Self
pub fn with_debug(self, debug: bool) -> Self
Enable debug mode
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose mode
Sourcepub fn with_callback(self, callback: Arc<dyn CallbackHandler>) -> Self
pub fn with_callback(self, callback: Arc<dyn CallbackHandler>) -> Self
Add a callback handler
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for RunnableConfig
impl Default for RunnableConfig
Source§fn default() -> RunnableConfig
fn default() -> RunnableConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RunnableConfig
impl<'de> Deserialize<'de> for RunnableConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RunnableConfig
impl PartialEq for RunnableConfig
Source§impl Serializable for RunnableConfig
impl Serializable for RunnableConfig
Source§fn is_serializable() -> bool
fn is_serializable() -> bool
Check if this object is serializable Read more
Source§fn to_json_pretty(&self) -> Result<String>
fn to_json_pretty(&self) -> Result<String>
Serialize this object to a pretty-printed JSON string
Source§fn to_dict(&self) -> Result<HashMap<String, Value>>
fn to_dict(&self) -> Result<HashMap<String, Value>>
Serialize this object to a dictionary (HashMap)
Auto Trait Implementations§
impl Freeze for RunnableConfig
impl !RefUnwindSafe for RunnableConfig
impl Send for RunnableConfig
impl Sync for RunnableConfig
impl Unpin for RunnableConfig
impl !UnwindSafe 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