is_option

Crates.iois_option
lib.rsis_option
version0.1.0
sourcesrc
created_at2023-01-05 13:07:47.303496
updated_at2023-01-05 13:07:47.303496
descriptionTell you if your type is an `Option<_>`.
homepage
repositoryhttps://github.com/irevoire/is_option
max_upload_size
id751515
size2,468
Tamo (irevoire)

documentation

README

Is my type an Option?

use is_option::is_option;

assert!(is_option!(Option<bool>));
assert!(is_option!(Option<String>));
assert!(is_option!(Option<&str>));

assert!(!is_option!(bool));
assert!(!is_option!(&str));
assert!(!is_option!(Vec<usize>));
Commit count: 4

cargo fmt