Trait ToHex
pub trait ToHex {
// Required methods
fn to_hex(&self) -> String;
fn from_hex(str: &str) -> Result<Self, GeneralError>
where Self: Sized;
}
Expand description
A generic type that can be converted to a hexadecimal string.
Required Methods§
fn from_hex(str: &str) -> Result<Self, GeneralError>where
Self: Sized,
fn from_hex(str: &str) -> Result<Self, GeneralError>where
Self: Sized,
Tries to parse the type from the hexadecimal representation.