Function checked_bit_u8

Source
pub fn checked_bit_u8(n: u32) -> Option<u8>
Expand description

Computes 1 << n if n is in bounds, i.e.: if n is smaller than the maximum number of bits supported by the type.

Returns None otherwise.