is_option 0.1.0

Tell you if your type is an `Option<_>`.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 2.15 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.01 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • irevoire/is_option
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • irevoire

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>));