Function constmuck::contiguous::from_i32[][src]

pub const fn from_i32<T>(
    integer: i32,
    bounds: IsContiguous<T, i32>
) -> Option<T>
Expand description

Converts ìnteger: i32 to T if it’s between the minimum and maximum values for T, otherwise returns None.

Requires that T implements Contiguous<Int = i32>

Examples

For examples, you can look at the ones for from_u8.