pub struct RescueVector<F> { /* private fields */ }
Expand description
Data type for rescue prp inputs, keys and internal data
Implementations§
Source§impl<F: PrimeField> RescueVector<F>
impl<F: PrimeField> RescueVector<F>
Sourcepub fn zero() -> RescueVector<F>
pub fn zero() -> RescueVector<F>
zero vector
Sourcepub fn elems(&self) -> Vec<F>
pub fn elems(&self) -> Vec<F>
Return vector of the field elements WARNING: may expose the internal state.
Sourcepub fn linear(&mut self, matrix: &RescueMatrix<F>, vector: &RescueVector<F>)
pub fn linear(&mut self, matrix: &RescueMatrix<F>, vector: &RescueVector<F>)
Perform a linear transform of the vector. Function needs to be public for circuits generation..
Source§impl<F: RescueParameter> RescueVector<F>
impl<F: RescueParameter> RescueVector<F>
Sourcepub fn non_linear(&mut self, matrix: &RescueMatrix<F>, vector: &RescueVector<F>)
pub fn non_linear(&mut self, matrix: &RescueMatrix<F>, vector: &RescueVector<F>)
Helper function to compute f(M,x,c) = Mx^a + c. Function needs to be public for circuits generation..
Trait Implementations§
Source§impl<F: Clone> Clone for RescueVector<F>
impl<F: Clone> Clone for RescueVector<F>
Source§fn clone(&self) -> RescueVector<F>
fn clone(&self) -> RescueVector<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Debug> Debug for RescueVector<F>
impl<F: Debug> Debug for RescueVector<F>
Source§impl<F: Default> Default for RescueVector<F>
impl<F: Default> Default for RescueVector<F>
Source§fn default() -> RescueVector<F>
fn default() -> RescueVector<F>
Returns the “default value” for a type. Read more
Source§impl<F: Copy> From<&[F]> for RescueVector<F>
impl<F: Copy> From<&[F]> for RescueVector<F>
Source§fn from(field_elems: &[F]) -> RescueVector<F>
fn from(field_elems: &[F]) -> RescueVector<F>
Converts to this type from the input type.
Source§impl<F: Copy> From<&[F; 4]> for RescueVector<F>
impl<F: Copy> From<&[F; 4]> for RescueVector<F>
Source§fn from(field_elems: &[F; 4]) -> RescueVector<F>
fn from(field_elems: &[F; 4]) -> RescueVector<F>
Converts to this type from the input type.
Source§impl<F: PartialEq> PartialEq for RescueVector<F>
impl<F: PartialEq> PartialEq for RescueVector<F>
impl<F: Copy> Copy for RescueVector<F>
impl<F: Eq> Eq for RescueVector<F>
impl<F> StructuralPartialEq for RescueVector<F>
Auto Trait Implementations§
impl<F> Freeze for RescueVector<F>where
F: Freeze,
impl<F> RefUnwindSafe for RescueVector<F>where
F: RefUnwindSafe,
impl<F> Send for RescueVector<F>where
F: Send,
impl<F> Sync for RescueVector<F>where
F: Sync,
impl<F> Unpin for RescueVector<F>where
F: Unpin,
impl<F> UnwindSafe for RescueVector<F>where
F: 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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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