Trait RawBytesEncoding

Source
pub trait RawBytesEncoding {
    // Required methods
    fn to_raw_bytes(&self) -> &[u8] ;
    fn from_raw_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>
       where Self: Sized;

    // Provided methods
    fn to_raw_hex(&self) -> String { ... }
    fn from_raw_hex(hex_str: &str) -> Result<Self, DeserializeError>
       where Self: Sized { ... }
}

Required Methods§

Source

fn to_raw_bytes(&self) -> &[u8]

Source

fn from_raw_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>
where Self: Sized,

Provided Methods§

Source

fn to_raw_hex(&self) -> String

Source

fn from_raw_hex(hex_str: &str) -> Result<Self, DeserializeError>
where Self: Sized,

Implementors§