pub trait Validate {
    type Error;
    fn validate(&self) -> Result<(), Self::Error>;
}
Expand description

A trait for types which validate their state before construction finishes.

The generated builder will call this method if the #[builder(validate)] attribute is placed at the struct level.

Associated Types

The error returned for an invalid value.

Required methods

Validates the state of self.

Implementors