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§
Sourcefn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Try to convert from a bytes slice.
Provided Methods§
Sourcefn try_from_bytes_hex(hex_string: &str) -> StdResult<Self>
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 AggregateSignature<MithrilMembershipDigest>
impl TryFromBytes for AggregateSignature<MithrilMembershipDigest>
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for AggregateVerificationKeyForConcatenation<MithrilMembershipDigest>
impl TryFromBytes for AggregateVerificationKeyForConcatenation<MithrilMembershipDigest>
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for Parameters
impl TryFromBytes for Parameters
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for Initializer
impl TryFromBytes for Initializer
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for SingleSignature
impl TryFromBytes for SingleSignature
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for SingleSignatureWithRegisteredParty
impl TryFromBytes for SingleSignatureWithRegisteredParty
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for VerificationKeyForConcatenation
impl TryFromBytes for VerificationKeyForConcatenation
fn try_from_bytes(bytes: &[u8]) -> StdResult<Self>
Source§impl TryFromBytes for VerificationKeyForSnark
Available on crate feature future_snark only.
impl TryFromBytes for VerificationKeyForSnark
Available on crate feature
future_snark only.