Enum 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

Source§

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 Freeze for V1

§

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>,

Source§

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>,

Source§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V