Skip to main content

Validatable

Trait Validatable 

Source
pub trait Validatable {
    // Required methods
    fn validate(&self) -> Result<()>;
    fn validate_collect(&self, errors: &mut ValidationErrors);
}
Expand description

Trait for types that can be validated.

Required Methods§

Source

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

Validate this configuration.

Returns Ok(()) if valid, or Err with validation errors.

Source

fn validate_collect(&self, errors: &mut ValidationErrors)

Validate and collect errors without failing immediately.

Implementors§