dialoguer

Trait PasswordValidator

Source
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 F
where F: Fn(&String) -> Result<(), E>,

Source§

type Err = E