Trait AssertBoolean

Source
pub trait AssertBoolean {
    // Required methods
    fn is_true(self) -> Self;
    fn is_false(self) -> Self;
}
Expand description

Assert whether some value or expression is true or false.

§Examples

use asserting::prelude::*;

let subject = 42 > 41;
assert_that!(subject).is_true();

assert_that!(12 == 12).is_true();

assert_that!(42 < 42).is_false();

Required Methods§

Source

fn is_true(self) -> Self

Verifies that the subject is true.

Source

fn is_false(self) -> Self

Verifies that the subject is false.

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<R> AssertBoolean for Spec<'_, bool, R>
where R: FailingStrategy,