FromU8

Trait FromU8 

Source
pub trait FromU8 {
    // Required method
    fn from_u8(value: u8) -> Option<Self>
       where Self: Sized;
}
Expand description

Provides conversion from a u8 value to an enum type.

Required Methods§

Source

fn from_u8(value: u8) -> Option<Self>
where Self: Sized,

Converts a u8 value to the implementing type.

Returns None if the value is not a valid representation.

Implementors§