Skip to main content

HexExt

Trait HexExt 

Source
pub trait HexExt {
    // Required methods
    fn to_hex(&self) -> String;
    fn from_hex(s: &str) -> Result<Self, HexError>
       where Self: Sized;
}
Expand description

Extension trait for hex operations

Required Methods§

Source

fn to_hex(&self) -> String

Encode as hex string

Source

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

Decode from hex string

Implementations on Foreign Types§

Source§

impl HexExt for Vec<u8>

Source§

impl HexExt for [u8]

Source§

fn to_hex(&self) -> String

Implementors§