assertr/
condition.rs

1use core::fmt::Display;
2
3pub trait Condition<T> {
4    type Error: Display;
5
6    /// Test that the actual `value` conforms to / matches this condition (`self`).
7    fn test(&self, value: &T) -> Result<(), Self::Error>;
8}