Enum zcash_history::V1

source ·
pub enum V1 {}
Expand description

Version 1 of the Zcash chain history tree.

This version was used for the Heartwood and Canopy epochs.

Trait Implementations§

source§

impl Version for V1

§

type NodeData = NodeData

The node data for this tree version.
source§

fn consensus_branch_id(data: &Self::NodeData) -> u32

Returns the consensus branch ID for the given node data.
source§

fn start_height(data: &Self::NodeData) -> u64

Returns the start height for the given node data.
source§

fn end_height(data: &Self::NodeData) -> u64

Returns the end height for the given node data.
source§

fn combine_inner( subtree_commitment: [u8; 32], left: &Self::NodeData, right: &Self::NodeData ) -> Self::NodeData

Combines two nodes metadata. Read more
source§

fn read<R: Read>(consensus_branch_id: u32, r: &mut R) -> Result<Self::NodeData>

Parses node data from the given reader.
source§

fn write<W: Write>(data: &Self::NodeData, w: &mut W) -> Result<()>

Writes the byte representation of the given node data to the given writer.
source§

fn combine(left: &Self::NodeData, right: &Self::NodeData) -> Self::NodeData

Combines two nodes’ metadata.
source§

fn to_bytes(data: &Self::NodeData) -> Vec<u8>

Converts to byte representation.
source§

fn from_bytes<T: AsRef<[u8]>>( consensus_branch_id: u32, buf: T ) -> Result<Self::NodeData>

Convert from byte representation.
source§

fn hash(data: &Self::NodeData) -> [u8; 32]

Hash node metadata

Auto Trait Implementations§

§

impl RefUnwindSafe for V1

§

impl Send for V1

§

impl Sync for V1

§

impl Unpin for V1

§

impl UnwindSafe for V1

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.