[−][src]Trait ranged_num::CanMake
typenum
doesn't currently allow you to easily specify any numbers
(signed or unsigned) that can be converted to a given type. I've added
CanMake<V>
as a trait to indicate which types can easily make a runtime
value of type V
to use in type bounds.
Required methods
pub fn make() -> V
[src]
Create the V
that goes with this type.
Example:
use typenum::P5; use ranged_num::CanMake; let x: i8 = <P5 as CanMake<i8>>::make(); assert_eq!(x, 5);
Implementors
impl<T> CanMake<f32> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<f64> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<i8> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<i16> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<i32> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<i64> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<isize> for T where
T: Integer,
[src]
T: Integer,
impl<T> CanMake<u8> for T where
T: Unsigned,
[src]
T: Unsigned,
impl<T> CanMake<u16> for T where
T: Unsigned,
[src]
T: Unsigned,
impl<T> CanMake<u32> for T where
T: Unsigned,
[src]
T: Unsigned,
impl<T> CanMake<u64> for T where
T: Unsigned,
[src]
T: Unsigned,
impl<T> CanMake<usize> for T where
T: Unsigned,
[src]
T: Unsigned,