#[non_exhaustive]pub enum AssertionKind {
Always,
AlwaysOrUnreachable,
Sometimes,
Reachable,
Unreachable,
}Expand description
Which assertion macro a declaration came from.
This is the typed form of the display_type field in the serialized
event; display_type() gives that string back. It
is distinct from AssertType, the
three-way wire-level enum, which cannot tell assert_always! from
assert_always_or_unreachable! or assert_reachable! from
assert_unreachable! without also consulting must_hit.
The numeric and boolean macros (assert_always_greater_than!,
assert_sometimes_all!, and so on) are ordinary Always or Sometimes
assertions with guidance attached, and report as such.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Always
assert_always!: the condition must hold on
every evaluation, and the assertion must be reached.
AlwaysOrUnreachable
assert_always_or_unreachable!:
the condition must hold on every evaluation, but the assertion need
never be reached.
Sometimes
assert_sometimes!: the condition must
hold on at least one evaluation.
Reachable
assert_reachable!: the assertion must be
reached at least once.
Unreachable
assert_unreachable!: the assertion must
never be reached.
Implementations§
Source§impl AssertionKind
impl AssertionKind
Sourcepub const fn display_type(self) -> &'static str
pub const fn display_type(self) -> &'static str
The display_type string that serialized events carry for this kind,
which is also how the triage report labels it. Use it to match catalog
entries against events read back from a run.
Trait Implementations§
Source§impl Clone for AssertionKind
impl Clone for AssertionKind
Source§fn clone(&self) -> AssertionKind
fn clone(&self) -> AssertionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more