Crate more_asserts [] [src]

Small library providing some macros helpful for asserting.

Macros

assert_ge!

Panics if the first expression is not greater than or equal to the second. Requires that the types be comparable with >=.

assert_gt!

Panics if the first expression is not strictly greater than the second. Requires that the types be comparable with >.

assert_le!

Panics if the first expression is not less than or equal to the second. Requires that the types be comparable with <=.

assert_lt!

Panics if the first expression is not strictly less than the second. Requires that the types be comparable with <.

assert_ne!

Panics if the two expressions are equal. Requires that the types be comparable with !=.

debug_assert_ge!

Panics if the first expression is not greater than or equal to the second. Requires that the types be comparable with >=.

debug_assert_gt!

Panics if the first expression is not strictly greater than the second. Requires that the types be comparable with >.

debug_assert_le!

Panics if the first expression is not less than or equal to the second. Requires that the types be comparable with <=.

debug_assert_lt!

Panics if the first expression is not strictly less than the second. Requires that the types be comparable with <.

debug_assert_ne!

Panics if the two expressions are equal. Requires that the types be comparable with !=.

debug_unreachable!

Panics if reached. This is a variant of the standard library's unreachable! macro that is controlled by cfg!(debug_assertations).