pub struct GuardConfig {
pub version: String,
pub settings: GlobalSettings,
pub guards: Vec<GuardDefinition>,
pub pipeline: PipelineConfig,
}Expand description
Root configuration structure
Fields§
§version: StringVersion of the config schema
settings: GlobalSettingsGlobal settings
guards: Vec<GuardDefinition>Guard definitions
pipeline: PipelineConfigPipeline configuration
Implementations§
Source§impl GuardConfig
impl GuardConfig
Sourcepub fn load(path: impl AsRef<Path>) -> ConfigResult<Self>
pub fn load(path: impl AsRef<Path>) -> ConfigResult<Self>
Load configuration from a YAML file
Sourcepub fn from_yaml(content: &str) -> ConfigResult<Self>
pub fn from_yaml(content: &str) -> ConfigResult<Self>
Parse configuration from YAML string
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validate the configuration
Sourcepub fn build_pipeline(&self) -> ConfigResult<Pipeline>
pub fn build_pipeline(&self) -> ConfigResult<Pipeline>
Build a pipeline from this configuration
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Generate a default configuration with comprehensive pattern coverage
Sourcepub fn to_yaml(&self) -> ConfigResult<String>
pub fn to_yaml(&self) -> ConfigResult<String>
Serialize to YAML
Trait Implementations§
Source§impl Clone for GuardConfig
impl Clone for GuardConfig
Source§fn clone(&self) -> GuardConfig
fn clone(&self) -> GuardConfig
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 GuardConfig
impl Debug for GuardConfig
Source§impl<'de> Deserialize<'de> for GuardConfig
impl<'de> Deserialize<'de> for GuardConfig
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 GuardConfig
impl RefUnwindSafe for GuardConfig
impl Send for GuardConfig
impl Sync for GuardConfig
impl Unpin for GuardConfig
impl UnwindSafe for GuardConfig
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