[−][src]Crate boundnum
This crate provides a type boundary and a numeric type bounded by it.
Example
use boundnum::{expr::*, typenum::consts::*, Bounded, Boundable}; fn main() { let less4 = Bounded::<u8, Le<Arg, U4>>::new::<U1>(); let mul_of_two: Bounded<u8, Eq<U0, Rem<Arg, U2>>> = (*less4 + 3).bound().unwrap_or(Bounded::new::<U0>()); }
Re-exports
pub use typenum; |
Modules
expr | Expression structs. |
value | Type to value conversions. |
Structs
Bounded | A wrapper struct representing bounded numeric type. |
Traits
Boundable | A trait of the type being converted to |