Trait NumericMatchers

Source
pub trait NumericMatchers<T> {
    // Required methods
    fn to_be_positive(self) -> Self;
    fn to_be_negative(self) -> Self;
    fn to_be_zero(self) -> Self;
    fn to_be_greater_than(self, expected: T) -> Self;
    fn to_be_greater_than_or_equal(self, expected: T) -> Self;
    fn to_be_less_than(self, expected: T) -> Self;
    fn to_be_less_than_or_equal(self, expected: T) -> Self;
    fn to_be_in_range(self, range: Range<T>) -> Self;
    fn to_be_even(self) -> Self;
    fn to_be_odd(self) -> Self;
}
Expand description

Trait for numeric assertions

Required Methods§

Source

fn to_be_positive(self) -> Self

Source

fn to_be_negative(self) -> Self

Source

fn to_be_zero(self) -> Self

Source

fn to_be_greater_than(self, expected: T) -> Self

Source

fn to_be_greater_than_or_equal(self, expected: T) -> Self

Source

fn to_be_less_than(self, expected: T) -> Self

Source

fn to_be_less_than_or_equal(self, expected: T) -> Self

Source

fn to_be_in_range(self, range: Range<T>) -> Self

Source

fn to_be_even(self) -> Self

Source

fn to_be_odd(self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<V> NumericMatchers<i32> for Assertion<V>
where V: AsNumeric + Debug + Clone,