pub trait TryToBytes {
// Required method
fn to_bytes_vec(&self) -> StdResult<Vec<u8>>;
// Provided method
fn to_bytes_hex(&self) -> StdResult<String> { ... }
}Expand description
Traits for serializing to bytes
Required Methods§
Sourcefn to_bytes_vec(&self) -> StdResult<Vec<u8>>
fn to_bytes_vec(&self) -> StdResult<Vec<u8>>
Try to convert to a bytes vector.
Provided Methods§
Sourcefn to_bytes_hex(&self) -> StdResult<String>
fn to_bytes_hex(&self) -> StdResult<String>
Try to convert to hex bytes representation
Implementations on Foreign Types§
Source§impl TryToBytes for Parameters
impl TryToBytes for Parameters
Source§impl TryToBytes for Initializer
impl TryToBytes for Initializer
Source§impl TryToBytes for SingleSignature
impl TryToBytes for SingleSignature
Source§impl TryToBytes for VerificationKeyForSnark
Available on crate feature future_snark only.
impl TryToBytes for VerificationKeyForSnark
Available on crate feature
future_snark only.