Trait TryFromBytes

Source
pub trait TryFromBytes: Sized {
    // Required method
    fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>;

    // Provided method
    fn try_from_bytes_hex(hex_string: &str) -> StdResult<Self> { ... }
}
Expand description

Traits for deserializing from bytes

Required Methods§

Source

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Try to convert from a bytes slice.

Provided Methods§

Source

fn try_from_bytes_hex(hex_string: &str) -> StdResult<Self>

Try to convert from hex string encoded bytes.

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 TryFromBytes for StmAggrVerificationKey<Blake2b<U32>>

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmAggrSig<Blake2b<U32>>

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmParameters

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmInitializer

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmSig

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmSigRegParty

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmVerificationKeyPoP

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for StmVerificationKey

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for Signature

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for SigningKey

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for Sum6KesSig

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Source§

impl TryFromBytes for VerifyingKey

Source§

fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>

Implementors§