pub struct Poseidon<E: Environment, const RATE: usize> { /* private fields */ }Implementations§
Source§impl<E: Environment, const RATE: usize> Poseidon<E, RATE>
impl<E: Environment, const RATE: usize> Poseidon<E, RATE>
Sourcepub fn parameters(&self) -> &Arc<PoseidonParameters<E::Field, RATE, CAPACITY>> ⓘ
pub fn parameters(&self) -> &Arc<PoseidonParameters<E::Field, RATE, CAPACITY>> ⓘ
Returns the Poseidon parameters for hashing.
Sourcepub fn merkle_empty_hash(&self) -> Result<Field<E>>
pub fn merkle_empty_hash(&self) -> Result<Field<E>>
Returns the Merkle empty hash of this instance, computing it on first use.
This is PathHash::hash_children(0, 0) from snarkvm-console-collections, and
test_cached_empty_hash_matches_the_computed_one checks that the two agree. The
hash depends on the domain, so it is cached per instance, not per type.
Trait Implementations§
Source§impl<E: Environment, const RATE: usize> HashToGroup for Poseidon<E, RATE>
impl<E: Environment, const RATE: usize> HashToGroup for Poseidon<E, RATE>
Source§impl<E: Environment, const RATE: usize> HashToScalar for Poseidon<E, RATE>
impl<E: Environment, const RATE: usize> HashToScalar for Poseidon<E, RATE>
Auto Trait Implementations§
impl<E, const RATE: usize> !Freeze for Poseidon<E, RATE>
impl<E, const RATE: usize> RefUnwindSafe for Poseidon<E, RATE>where
Field<E>: RefUnwindSafe,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: RefUnwindSafe,
OnceLock<Field<E>>: RefUnwindSafe,
impl<E, const RATE: usize> Send for Poseidon<E, RATE>where
Field<E>: Send,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: Send,
OnceLock<Field<E>>: Send,
impl<E, const RATE: usize> Sync for Poseidon<E, RATE>where
Field<E>: Sync,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: Sync,
OnceLock<Field<E>>: Sync,
impl<E, const RATE: usize> Unpin for Poseidon<E, RATE>where
Field<E>: Unpin,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: Unpin,
OnceLock<Field<E>>: Unpin,
impl<E, const RATE: usize> UnsafeUnpin for Poseidon<E, RATE>where
Field<E>: UnsafeUnpin,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: UnsafeUnpin,
OnceLock<Field<E>>: UnsafeUnpin,
impl<E, const RATE: usize> UnwindSafe for Poseidon<E, RATE>where
Field<E>: UnwindSafe,
Arc<PoseidonParameters<<E as Environment>::Field, RATE, CAPACITY>>: UnwindSafe,
OnceLock<Field<E>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more