one-of
Macro to represent a type that can be converted either From
or TryInto
the given types
This crate only works on the nightly version of Rust
Usage
use ;
// either `u32` or `char`
let x: one_of! = 42.into;
assert_eq!;
assert_eq!;
// some type of integer
let x: one_of! = 42.into;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
// case macro is the `match` keyword for `one_of` types
case!;
Changelog
See CHANGELOG.md