#options #inspect #inspect-none

option-inspect-none

The crate contains a trait, that implements the inspect_none(..) method on Options

1 stable release

1.0.0 Feb 9, 2024

#16 in #inspect

MIT license

3KB

option-inspect-none

The crate contains a trait, that implements the inspect_none(..) method on Options.

Usage example

let mut inspector_function_called = false;
None::<()>.inspect_none(|| inspector_function_called = true);
assert!(inspector_function_called);

No runtime deps