Crates.io | option-inspect-none |
lib.rs | option-inspect-none |
version | 1.0.0 |
source | src |
created_at | 2024-02-09 20:28:16.049271 |
updated_at | 2024-02-09 20:28:16.049271 |
description | The crate contains a trait, that implements the inspect_none(..) method on Options. |
homepage | |
repository | https://github.com/bytifex/option-inspect-none.git |
max_upload_size | |
id | 1134307 |
size | 3,092 |
The crate contains a trait, that implements the inspect_none(..) method on Options.
let mut inspector_function_called = false;
None::<()>.inspect_none(|| inspector_function_called = true);
assert!(inspector_function_called);