pub struct TestWorkersConfig {
pub settings: TestSettings,
pub workers: Vec<TestWorkerEntry>,
}Expand description
Complete test worker configuration.
Fields§
§settings: TestSettingsTest-specific settings.
workers: Vec<TestWorkerEntry>List of worker definitions.
Implementations§
Source§impl TestWorkersConfig
impl TestWorkersConfig
Sourcepub fn load() -> TestConfigResult<Self>
pub fn load() -> TestConfigResult<Self>
Load configuration from the default path or environment override.
Sourcepub fn load_from(path: &Path) -> TestConfigResult<Self>
pub fn load_from(path: &Path) -> TestConfigResult<Self>
Load configuration from a specific path.
Sourcepub fn validate(&self) -> TestConfigResult<()>
pub fn validate(&self) -> TestConfigResult<()>
Validate the configuration.
Sourcepub fn enabled_workers(&self) -> Vec<&TestWorkerEntry>
pub fn enabled_workers(&self) -> Vec<&TestWorkerEntry>
Get only enabled workers.
Sourcepub fn has_workers(&self) -> bool
pub fn has_workers(&self) -> bool
Check if any workers are configured.
Sourcepub fn has_enabled_workers(&self) -> bool
pub fn has_enabled_workers(&self) -> bool
Check if any workers are enabled.
Sourcepub fn effective_timeout_secs(&self) -> u64
pub fn effective_timeout_secs(&self) -> u64
Get the effective timeout, considering environment override.
Sourcepub fn to_worker_configs(&self) -> Vec<WorkerConfig>
pub fn to_worker_configs(&self) -> Vec<WorkerConfig>
Convert all enabled workers to standard WorkerConfig for daemon integration.
Trait Implementations§
Source§impl Clone for TestWorkersConfig
impl Clone for TestWorkersConfig
Source§fn clone(&self) -> TestWorkersConfig
fn clone(&self) -> TestWorkersConfig
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 TestWorkersConfig
impl Debug for TestWorkersConfig
Source§impl Default for TestWorkersConfig
impl Default for TestWorkersConfig
Source§fn default() -> TestWorkersConfig
fn default() -> TestWorkersConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TestWorkersConfig
impl<'de> Deserialize<'de> for TestWorkersConfig
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 TestWorkersConfig
impl RefUnwindSafe for TestWorkersConfig
impl Send for TestWorkersConfig
impl Sync for TestWorkersConfig
impl Unpin for TestWorkersConfig
impl UnsafeUnpin for TestWorkersConfig
impl UnwindSafe for TestWorkersConfig
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