[][src]Trait hexutil::unstable::FromHexCore

pub trait FromHexCore: Sized {
    type Bytes;
    fn create_bytes(len: Option<usize>) -> Self::Bytes;
fn bytes_as_mut(bytes: &mut Self::Bytes) -> &mut [u8];
fn from_binary_bytes(bytes: Self::Bytes) -> Result<Self, FromHexError>; }

Create a type from a binary or hexadecimal representation.

Associated Types

type Bytes

The type of the binary representation.

Loading content...

Required methods

fn create_bytes(len: Option<usize>) -> Self::Bytes

Create a bytes type of size len.

fn bytes_as_mut(bytes: &mut Self::Bytes) -> &mut [u8]

Return a mutable reference to the bytes in bytes.

fn from_binary_bytes(bytes: Self::Bytes) -> Result<Self, FromHexError>

Create an instance of this type from bytes.

Loading content...

Implementors

Loading content...