Trait ParseHexStr

Source
pub trait ParseHexStr<const N: usize>: Serializable<N> {
    // Provided method
    fn from_hex_str(s: &str) -> Result<Self, Self::Error>
       where Self: Sized,
             Self::Error: BadLength + InvalidChar { ... }
}
Expand description

An optional trait used to parse a string slice for types that implements the Serializable trait. The default implementation makes use of Serializable trait to provide the necessary parsing functionality without additional code from the consumer.

Provided Methods§

Source

fn from_hex_str(s: &str) -> Result<Self, Self::Error>
where Self: Sized, Self::Error: BadLength + InvalidChar,

Parse a string slice as bytes hex representation and returns `

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, const N: usize> ParseHexStr<N> for T
where T: Serializable<N>,