postfix_assert

This crate provides trait implementations for standard library structs with properties that are commonly asserted. These assertions are different than other crates in that they abandon the common assert!(x.is_none()); statement style in favor of an inline, readable x.assert_none();. Importantly, these assert_* methods return the reference that they are called on so that you can interweave your assertions with your code instead of them needing to be on their separate lines.

Example

```rust fn computationproducingsome() -> Option { Some(1) }

fn computationproducingnonefromsome(x: Option) -> Option { None } computationproducingsome() .assertsome() .and(computationproducingnonefromsome) .assertnone() ```

Crate Features

Other Assertion Crates

I am starting to compile a list of crates that empower assertions in some form. I use this for my benefit in two ways: I learn about new crates, which I may want to use in my code and, I can ~borrow~ ideas for useful assertions from these other crates. This list will always be incomplete and may or may not have my comments alongside each crate.

License: MIT