Type Definition enumx::TyPat[][src]

type TyPat<T> = T;

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 ),
    }
}