Trait assertor::EqualityAssertion
source · 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§
sourcefn is_equal_to<B: Borrow<S>>(&self, expected: B) -> R
fn is_equal_to<B: Borrow<S>>(&self, expected: B) -> R
Checks if the subject is equal to expected
.
sourcefn is_not_equal_to<B: Borrow<S>>(&self, expected: B) -> R
fn is_not_equal_to<B: Borrow<S>>(&self, expected: B) -> R
Checks if the subject value is NOT equal to expected
.