Trait can_type_rs::Conversion
source · pub trait Conversionwhere
Self: Sized,{
type Type;
// Required methods
fn from_bits(bits: Self::Type) -> Self;
fn from_hex(hex_str: &str) -> Self;
fn try_from_bits(bits: Self::Type) -> Option<Self>;
fn try_from_hex(hex_str: &str) -> Option<Self>;
fn into_bits(self) -> Self::Type;
fn into_hex(self) -> String;
}Required Associated Types§
Required Methods§
sourcefn try_from_bits(bits: Self::Type) -> Option<Self>
fn try_from_bits(bits: Self::Type) -> Option<Self>
Convert an integer of type Self::Type into Self
sourcefn try_from_hex(hex_str: &str) -> Option<Self>
fn try_from_hex(hex_str: &str) -> Option<Self>
Convert a hexadecimal string slice into Self
Object Safety§
This trait is not object safe.