assertr 0.5.1

Fluent assertions for the Rust programming language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use core::fmt::Display;

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

    /// Test that the actual `value` conforms to / matches this condition (`self`).
    ///
    /// # Errors
    ///
    /// Returns an error describing why the value does not match the condition.
    fn test(&self, value: &T) -> Result<(), Self::Error>;
}