pub struct EngineConfig {
pub scripts_dir: Option<PathBuf>,
pub plans_dir: Option<PathBuf>,
pub default_timeout: u64,
pub environment: HashMap<String, String>,
pub require_tests: bool,
pub logging: LoggingConfig,
pub execution: ExecutionConfig,
}Expand description
Configuration for the entire engine
Fields§
§scripts_dir: Option<PathBuf>Path to the scripts directory for auto-discovery
plans_dir: Option<PathBuf>Path to the plans directory
default_timeout: u64Default timeout for script execution in seconds
environment: HashMap<String, String>Global environment variables to pass to all scripts
require_tests: boolWhether to require tests for all scripts by default
logging: LoggingConfigLogging configuration
execution: ExecutionConfigExecution configuration
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn from_toml_str(toml_str: &str) -> Result<Self>
pub fn from_toml_str(toml_str: &str) -> Result<Self>
Load configuration from a TOML string
Sourcepub fn save_to_file(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_to_file(&self, path: impl AsRef<Path>) -> Result<()>
Save configuration to a TOML file
Sourcepub fn merge_with(self, other: EngineConfig) -> Self
pub fn merge_with(self, other: EngineConfig) -> Self
Merge this configuration with another, with the other taking precedence
Sourcepub fn sample_config() -> String
pub fn sample_config() -> String
Create a sample configuration file content
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
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 Debug for EngineConfig
impl Debug for EngineConfig
Source§impl Default for EngineConfig
impl Default for EngineConfig
Source§impl<'de> Deserialize<'de> for EngineConfig
impl<'de> Deserialize<'de> for EngineConfig
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
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnwindSafe for EngineConfig
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