[−][src]Struct poseidon252::PoseidonBranch
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]
fn clone(&self) -> PoseidonBranch
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
C: Compound<H>,
C::Annotation: Borrow<StorageScalar>,
H: ByteHash,
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.
fn from(branch: &Branch<C, H>) -> PoseidonBranch
[src]
impl PartialEq<PoseidonBranch> for PoseidonBranch
[src]
fn eq(&self, other: &PoseidonBranch) -> bool
[src]
fn ne(&self, other: &PoseidonBranch) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,