Skip to main content

Condition

Trait Condition 

Source
pub trait Condition<T> {
    type Error: Display;

    // Required method
    fn test(&self, value: &T) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn test(&self, value: &T) -> Result<(), Self::Error>

Test that the actual value conforms to / matches this condition (self).

§Errors

Returns an error describing why the value does not match the condition.

Implementors§