Function constmuck::contiguous::from_usize [−][src]
pub const fn from_usize<T>(
integer: usize,
bounds: ImplsContiguous<T, usize>
) -> Option<T>
Expand description
Converts ìnteger: usize
to T
if it’s between the minimum and maximum values for T
, otherwise returns None
.
Requires that T
implements Contiguous<Int = usize>
Examples
For examples, you can look
at the ones for from_u8
.