hopr_lib

Trait ToHex

Source
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§

Source

fn to_hex(&self) -> String

Hexadecimal representation of this type.

Source

fn from_hex(str: &str) -> Result<Self, GeneralError>
where Self: Sized,

Tries to parse the type from the hexadecimal representation.

Implementors§

Source§

impl<T> ToHex for T