pub trait EqualityAssertion<S, R> {
    // Required methods
    fn is_equal_to<B: Borrow<S>>(&self, expected: B) -> R;
    fn is_not_equal_to<B: Borrow<S>>(&self, expected: B) -> R;
}
Expand description

Trait for equality assertion.

Example

use assertor::*;
assert_that!(1).is_equal_to(1);
assert_that!(1).is_not_equal_to(2);

Required Methods§

source

fn is_equal_to<B: Borrow<S>>(&self, expected: B) -> R

Checks if the subject is equal to expected.

source

fn is_not_equal_to<B: Borrow<S>>(&self, expected: B) -> R

Checks if the subject value is NOT equal to expected.

Implementors§