[][src]Struct poseidon252::PoseidonBranch

pub struct PoseidonBranch {
    pub root: BlsScalar,
    pub levels: Vec<PoseidonLevel>,
}

The Poseidon structure will accept a number of inputs equal to the arity.

The levels are ordered so the first element of levels is actually the bottom level of the Kelvin tree.

Fields

root: BlsScalar

Root of the Merkle Tree

levels: Vec<PoseidonLevel>

Levels of the MerkleTree with it's corresponding leaves and offset.

Implementations

impl PoseidonBranch[src]

pub fn new() -> Self[src]

Generates a default PoseidonBranch with the specified capacity for storing n levels inside.

pub fn with_capacity(n: usize) -> Self[src]

Generates a default PoseidonBranch with the specified capacity for storing n levels inside.

pub fn extend(&mut self, target_depth: usize) -> usize[src]

Extends the branch to the specified length

Trait Implementations

impl Clone for PoseidonBranch[src]

impl Debug for PoseidonBranch[src]

impl<'_, '_, C, H> From<&'_ Branch<'_, C, H>> for PoseidonBranch where
    C: Compound<H>,
    C::Annotation: Borrow<StorageScalar>,
    H: ByteHash, 
[src]

Provides a conversion between Branch and PoseidonBranch.

We extract the data from the Branch and store it appropiately inside of the PoseidonBranch structure with the bitflags already computed and the offsets pointing to the next levels pointing also to the correct places.

impl PartialEq<PoseidonBranch> for PoseidonBranch[src]

impl StructuralPartialEq for PoseidonBranch[src]

Auto Trait Implementations

impl RefUnwindSafe for PoseidonBranch

impl Send for PoseidonBranch

impl Sync for PoseidonBranch

impl Unpin for PoseidonBranch

impl UnwindSafe for PoseidonBranch

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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