pub trait PasswordValidator {
    type Err;

    // Required method
    fn validate(&self, input: &String) -> Result<(), Self::Err>;
}
Expand description

Trait for password validators.

Required Associated Types§

Required Methods§

source

fn validate(&self, input: &String) -> Result<(), Self::Err>

Invoked with the value to validate.

If this produces Ok(()) then the value is used and parsed, if an error is returned validation fails with that error.

Implementors§

source§

impl<F, E> PasswordValidator for Fwhere F: Fn(&String) -> Result<(), E>,

§

type Err = E