pub type TyPat<T> = T;
Expand description
Wrapper for non-path types in type pattern matching using #[ty_pat]
match
use enumx::export::*;
use enumx::predefined::*;
#[enumx] fn bar( input: Enum!(&'static str,i32) ) {
#[ty_pat] match input {
TyPat::<&'static str>(s) => println!( "it's static str:{}", s ),
i32(i) => println!( "it's i32:{}", i ),
}
}