I have a function with a type parameter U
that returns an Option<U>
. U
is bound by the trait num::Num
. As such, U
can be a usize
, u8
, u16
, u32
, u64
, u128
, isize
, etc.
How do I match U
? E.g.,
match U {
u8 => {},
u16 => {}
_ => {}
}