Trait 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§

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.

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§