[go: up one dir, main page]

Module matchers

Source
Expand description

A module contains matchers.

Structs§

BeCloseTo
A matcher for be_close_to assertions for float numbers.
BeEmpty
A matcher for be_empty assertions.
BeEqualTo
A matcher for be_equal_to assertions for types that conforms to PartialEq trait.
BeErr
A matcher for be_err assertions for Result<T, E> type.
BeFalse
A matcher for be_false assertions.
BeNone
A matcher for be_none assertions for Option<T> types.
BeOk
A matcher for be_ok assertions for Result<T, E> type.
BeSome
A matcher for be_some assertions for Option<T> types.
BeTrue
A matcher for be_true assertions.
BeWithinRange
A matcher for be_within_range assertions.
HaveCount
A matcher for have_count assertions.
PartialOrder
A matcher for types that conform to PartialOrd trait.

Functions§

be_close_to
Returns a new BeCloseTo matcher with default delta equal to 0.001.
be_empty
Returns a new BeEmpty matcher.
be_eq
Returns a new BeEqualTo matcher.
be_equal_to
Returns a new BeEqualTo matcher.
be_err
Returns a new BeErr matcher.
be_false
Returns a new BeFalse matcher.
be_ge
Returns a new PartialOrder (greater or equal to) matcher.
be_greater_or_equal_to
Returns a new PartialOrder (greater or equal to) matcher.
be_greater_than
Returns a new PartialOrder (greater than) matcher.
be_gt
Returns a new PartialOrder (greater than) matcher.
be_le
Returns a new PartialOrder (less or equal to) matcher.
be_less_or_equal_to
Returns a new PartialOrder (less or equal to) matcher.
be_less_than
Returns a new PartialOrder (less than) matcher.
be_lt
Returns a new PartialOrder (less than) matcher.
be_none
Returns a new BeNone matcher.
be_ok
Returns a new BeOk matcher.
be_some
Returns a new BeSome matcher.
be_true
Returns a new BeTrue matcher.
be_within_range
Returns a new BeWithinRange matcher.
have_count
Returns a new HaveCount matcher.