zebra_chain::serialization::zcash_deserialize

Trait ZcashDeserialize

source
pub trait ZcashDeserialize: Sized {
    // Required method
    fn zcash_deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>;
}
Expand description

Consensus-critical deserialization for Zcash.

This trait provides a generic deserialization for consensus-critical formats, such as network messages, transactions, blocks, etc.

It is intended for use only for consensus-critical formats. Internal deserialization can freely use serde, or any other format.

Required Methods§

source

fn zcash_deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>

Try to read self from the given reader.

This function has a zcash_ prefix to alert the reader that the serialization in use is consensus-critical serialization, rather than some other kind of serialization.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ZcashDeserialize for Option<ShieldedData>

source§

impl ZcashDeserialize for Option<ShieldedData<SharedAnchor>>

source§

impl ZcashDeserialize for String

Read a Bitcoin-encoded UTF-8 string.

source§

impl ZcashDeserialize for Vec<u8>

Implement ZcashDeserialize for Vec<u8> directly instead of using the blanket Vec implementation

This allows us to optimize the inner loop into a single call to read_exact() Note that we don’t implement TrustedPreallocate for u8. This allows the optimization without relying on specialization.

source§

impl ZcashDeserialize for Ipv6Addr

Read a Bitcoin-encoded IPv6 address.

source§

impl ZcashDeserialize for Base

source§

impl ZcashDeserialize for Fq

source§

impl ZcashDeserialize for PublicKey

source§

impl ZcashDeserialize for Scalar

source§

impl ZcashDeserialize for Signature<SpendAuth>

source§

impl<P> ZcashDeserialize for Option<JoinSplitData<P>>

source§

impl<T> ZcashDeserialize for Arc<T>

source§

impl<T: ZcashDeserialize + TrustedPreallocate> ZcashDeserialize for Vec<T>

Deserialize a Vec, where the number of items is set by a CompactSize prefix in the data. This is the most common format in Zcash.

See zcash_deserialize_external_count for more details, and usage information.

source§

impl<T: SigType> ZcashDeserialize for Signature<T>

Implementors§

source§

impl ZcashDeserialize for Transaction

source§

impl ZcashDeserialize for LockTime

source§

impl ZcashDeserialize for Address

source§

impl ZcashDeserialize for Input

source§

impl ZcashDeserialize for Solution

source§

impl ZcashDeserialize for Amount<NegativeAllowed>

source§

impl ZcashDeserialize for Amount<NonNegative>

source§

impl ZcashDeserialize for zebra_chain::block::hash::Hash

source§

impl ZcashDeserialize for CountedHeader

source§

impl ZcashDeserialize for Header

source§

impl ZcashDeserialize for Block

source§

impl ZcashDeserialize for Action

source§

impl ZcashDeserialize for ValueCommitment

source§

impl ZcashDeserialize for zebra_chain::orchard::keys::EphemeralPublicKey

source§

impl ZcashDeserialize for zebra_chain::orchard::note::ciphertexts::EncryptedNote

source§

impl ZcashDeserialize for zebra_chain::orchard::note::ciphertexts::WrappedNoteKey

source§

impl ZcashDeserialize for Flags

source§

impl ZcashDeserialize for zebra_chain::orchard::tree::Root

source§

impl ZcashDeserialize for Bctv14Proof

source§

impl ZcashDeserialize for Groth16Proof

source§

impl ZcashDeserialize for Halo2Proof

source§

impl ZcashDeserialize for NotSmallOrderValueCommitment

source§

impl ZcashDeserialize for zebra_chain::sapling::keys::EphemeralPublicKey

source§

impl ZcashDeserialize for zebra_chain::sapling::note::ciphertexts::EncryptedNote

source§

impl ZcashDeserialize for zebra_chain::sapling::note::ciphertexts::WrappedNoteKey

source§

impl ZcashDeserialize for OutputInTransactionV4

source§

impl ZcashDeserialize for OutputPrefixInTransactionV5

source§

impl ZcashDeserialize for Spend<PerSpendAnchor>

source§

impl ZcashDeserialize for SpendPrefixInTransactionV5

source§

impl ZcashDeserialize for zebra_chain::sapling::tree::Root

source§

impl ZcashDeserialize for zebra_chain::sprout::note::ciphertexts::EncryptedNote

source§

impl ZcashDeserialize for Mac

source§

impl ZcashDeserialize for AuthDigest

source§

impl ZcashDeserialize for zebra_chain::transaction::hash::Hash

source§

impl ZcashDeserialize for WtxId

source§

impl ZcashDeserialize for Script

source§

impl ZcashDeserialize for OutPoint

source§

impl ZcashDeserialize for Output

source§

impl ZcashDeserialize for CompactSize64

source§

impl ZcashDeserialize for CompactSizeMessage

source§

impl ZcashDeserialize for DateTime32

source§

impl<P: ZkSnarkProof> ZcashDeserialize for JoinSplit<P>

source§

impl<T: ZcashDeserialize + TrustedPreallocate> ZcashDeserialize for AtLeastOne<T>

Deserialize an AtLeastOne vector, where the number of items is set by a CompactSize prefix in the data. This is the most common format in Zcash.