pub trait FromHex: Sized {
// Required method
fn from_byte_iter<I>(iter: I) -> Result<Self, Error>
where I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator;
// Provided method
fn from_hex(s: &str) -> Result<Self, Error> { ... }
}Expand description
Trait for objects that can be deserialized from hex strings
Required Methods§
Sourcefn from_byte_iter<I>(iter: I) -> Result<Self, Error>
fn from_byte_iter<I>(iter: I) -> Result<Self, Error>
Produce an object from a byte iterator
Provided Methods§
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.
Implementations on Foreign Types§
Source§impl FromHex for Vec<u8>
Available on crate features std or alloc only.
impl FromHex for Vec<u8>
Available on crate features
std or alloc only.