Skip to main content

blanket_try_from_hex_bytes

Function blanket_try_from_hex_bytes 

Source
pub fn blanket_try_from_hex_bytes<T, I: for<'d> Decode<'d, ()>>(
    s: &str,
    new: impl Fn(Bytes, I) -> T,
) -> Result<T, String>
Expand description

An implementation of ‘TryFrom’ from hex-encoded strings, for any type that can be decoded from CBOR. Yields the original bytes and the deserialized value.