Validate

Trait Validate 

Source
pub trait Validate {
    // Required method
    fn validate(&self) -> Result<()>;

    // Provided method
    fn validate_with_context(&self, context: &str) -> Result<()> { ... }
}
Expand description

Core validation trait that can be derived for automatic parameter validation

Required Methods§

Source

fn validate(&self) -> Result<()>

Validate all parameters and return an error if any validation fails

Provided Methods§

Source

fn validate_with_context(&self, context: &str) -> Result<()>

Validate and provide detailed error information

Implementors§