Struct hex_wrapper::Hex32 [−][src]
pub struct Hex32(_);Expand description
32-bit unsigned hexadecimal numbers.
use hex_wrapper::Hex32;
// from random value
let rand = Hex32::new();
let inner = rand.get();
assert_eq!(rand.to_string(), format!("{:x}", inner));
// from given value
let given = Hex32::from(0xa3);
assert_eq!(given.to_string(), String::from("a3"));
// from string
let from_str = "a3".parse::<Hex32>();
assert_eq!(from_str.unwrap(), Hex32::from(0xa3));Implementations
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Hex32
impl UnwindSafe for Hex32
Blanket Implementations
Mutably borrows from an owned value. Read more