pub type Digest<T> = FieldArray<T, NUM_RANDOM_ELEMENTS>;
Aliased Type§
struct Digest<T>(pub [T; 4]);
Fields§
§0: [T; 4]
Trait Implementations
Source§impl<F, const N: usize> Add for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Add for FieldArray<F, N>where
F: Field,
Source§type Output = FieldArray<F, N>
type Output = FieldArray<F, N>
The resulting type after applying the
+
operator.Source§fn add(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Add>::Output
fn add(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Add>::Output
Performs the
+
operation. Read moreSource§impl<F, const N: usize> AddAssign<F> for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> AddAssign<F> for FieldArray<F, N>where
F: Field,
Source§fn add_assign(&mut self, rhs: F)
fn add_assign(&mut self, rhs: F)
Performs the
+=
operation. Read moreSource§impl<F, const N: usize> AddAssign for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> AddAssign for FieldArray<F, N>where
F: Field,
Source§fn add_assign(&mut self, rhs: FieldArray<F, N>)
fn add_assign(&mut self, rhs: FieldArray<F, N>)
Performs the
+=
operation. Read moreSource§impl<F, const N: usize> Clone for FieldArray<F, N>
impl<F, const N: usize> Clone for FieldArray<F, N>
Source§fn clone(&self) -> FieldArray<F, N>
fn clone(&self) -> FieldArray<F, N>
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, const N: usize> Debug for FieldArray<F, N>
impl<F, const N: usize> Debug for FieldArray<F, N>
Source§impl<F, const N: usize> Default for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Default for FieldArray<F, N>where
F: Field,
Source§fn default() -> FieldArray<F, N>
fn default() -> FieldArray<F, N>
Returns the “default value” for a type. Read more
Source§impl<F, const N: usize> FieldAlgebra for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> FieldAlgebra for FieldArray<F, N>where
F: Field,
Source§const ZERO: FieldArray<F, N>
const ZERO: FieldArray<F, N>
The additive identity of the algebra. Read more
Source§const ONE: FieldArray<F, N>
const ONE: FieldArray<F, N>
The multiplicative identity of the Algebra Read more
Source§const TWO: FieldArray<F, N>
const TWO: FieldArray<F, N>
The element in the algebra given by
ONE + ONE
. Read moreSource§const NEG_ONE: FieldArray<F, N>
const NEG_ONE: FieldArray<F, N>
The element in the algebra given by
-ONE
. Read moretype F = F
Source§fn from_f(f: <FieldArray<F, N> as FieldAlgebra>::F) -> FieldArray<F, N>
fn from_f(f: <FieldArray<F, N> as FieldAlgebra>::F) -> FieldArray<F, N>
Interpret a field element as a commutative algebra element. Read more
Source§fn from_canonical_u8(n: u8) -> FieldArray<F, N>
fn from_canonical_u8(n: u8) -> FieldArray<F, N>
Convert from a canonical
u8
. Read moreSource§fn from_canonical_u16(n: u16) -> FieldArray<F, N>
fn from_canonical_u16(n: u16) -> FieldArray<F, N>
Convert from a canonical
u16
. Read moreSource§fn from_canonical_u32(n: u32) -> FieldArray<F, N>
fn from_canonical_u32(n: u32) -> FieldArray<F, N>
Convert from a canonical
u32
. Read moreSource§fn from_canonical_u64(n: u64) -> FieldArray<F, N>
fn from_canonical_u64(n: u64) -> FieldArray<F, N>
Convert from a canonical
u64
. Read moreSource§fn from_canonical_usize(n: usize) -> FieldArray<F, N>
fn from_canonical_usize(n: usize) -> FieldArray<F, N>
Convert from a canonical
usize
. Read morefn from_wrapped_u32(n: u32) -> FieldArray<F, N>
fn from_wrapped_u64(n: u64) -> FieldArray<F, N>
Source§fn exp_const_u64<const POWER: u64>(&self) -> Self
fn exp_const_u64<const POWER: u64>(&self) -> Self
Exponentiation by a constant power. Read more
Source§fn exp_power_of_2(&self, power_log: usize) -> Self
fn exp_power_of_2(&self, power_log: usize) -> Self
Compute self^{2^power_log} by repeated squaring.
Source§fn mul_2exp_u64(&self, exp: u64) -> Self
fn mul_2exp_u64(&self, exp: u64) -> Self
self * 2^exp
Source§fn powers(&self) -> Powers<Self>
fn powers(&self) -> Powers<Self>
Construct an iterator which returns powers of
self: self^0, self^1, self^2, ...
.Source§fn shifted_powers(&self, start: Self) -> Powers<Self>
fn shifted_powers(&self, start: Self) -> Powers<Self>
Construct an iterator which returns powers of
self
shifted by start: start, start*self^1, start*self^2, ...
.Source§fn powers_packed<P>(&self) -> Powers<P>where
P: PackedField<Scalar = Self>,
fn powers_packed<P>(&self) -> Powers<P>where
P: PackedField<Scalar = Self>,
Source§fn shifted_powers_packed<P>(&self, start: Self) -> Powers<P>where
P: PackedField<Scalar = Self>,
fn shifted_powers_packed<P>(&self, start: Self) -> Powers<P>where
P: PackedField<Scalar = Self>,
Construct an iterator which returns powers of
self
shifted by start
and packed into PackedField
elements. Read moreSource§fn dot_product<const N: usize>(u: &[Self; N], v: &[Self; N]) -> Self
fn dot_product<const N: usize>(u: &[Self; N], v: &[Self; N]) -> Self
Compute the dot product of two vectors.
Source§fn zero_vec(len: usize) -> Vec<Self>
fn zero_vec(len: usize) -> Vec<Self>
Allocates a vector of zero elements of length
len
. Many operating systems zero pages
before assigning them to a userspace process. In that case, our process should not need to
write zeros, which would be redundant. However, the compiler may not always recognize this. Read moreSource§impl<F, const N: usize> From<[F; N]> for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> From<[F; N]> for FieldArray<F, N>where
F: Field,
Source§fn from(arr: [F; N]) -> FieldArray<F, N>
fn from(arr: [F; N]) -> FieldArray<F, N>
Converts to this type from the input type.
Source§impl<F, const N: usize> From<F> for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> From<F> for FieldArray<F, N>where
F: Field,
Source§fn from(val: F) -> FieldArray<F, N>
fn from(val: F) -> FieldArray<F, N>
Converts to this type from the input type.
Source§impl<F, const N: usize> Mul for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Mul for FieldArray<F, N>where
F: Field,
Source§type Output = FieldArray<F, N>
type Output = FieldArray<F, N>
The resulting type after applying the
*
operator.Source§fn mul(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Mul>::Output
fn mul(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Mul>::Output
Performs the
*
operation. Read moreSource§impl<F, const N: usize> MulAssign<F> for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> MulAssign<F> for FieldArray<F, N>where
F: Field,
Source§fn mul_assign(&mut self, rhs: F)
fn mul_assign(&mut self, rhs: F)
Performs the
*=
operation. Read moreSource§impl<F, const N: usize> MulAssign for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> MulAssign for FieldArray<F, N>where
F: Field,
Source§fn mul_assign(&mut self, rhs: FieldArray<F, N>)
fn mul_assign(&mut self, rhs: FieldArray<F, N>)
Performs the
*=
operation. Read moreSource§impl<F, const N: usize> PackedValue for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> PackedValue for FieldArray<F, N>where
F: Field,
const WIDTH: usize = N
type Value = F
fn from_slice( slice: &[<FieldArray<F, N> as PackedValue>::Value], ) -> &FieldArray<F, N>
fn from_slice_mut( slice: &mut [<FieldArray<F, N> as PackedValue>::Value], ) -> &mut FieldArray<F, N>
Source§fn from_fn<Fn>(f: Fn) -> FieldArray<F, N>
fn from_fn<Fn>(f: Fn) -> FieldArray<F, N>
Similar to
core:array::from_fn
.fn as_slice(&self) -> &[<FieldArray<F, N> as PackedValue>::Value]
fn as_slice_mut(&mut self) -> &mut [<FieldArray<F, N> as PackedValue>::Value]
fn pack_slice(buf: &[Self::Value]) -> &[Self]
fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])
fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]
fn pack_maybe_uninit_slice_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> &mut [MaybeUninit<Self>]
fn pack_slice_with_suffix_mut( buf: &mut [Self::Value], ) -> (&mut [Self], &mut [Self::Value])
fn pack_maybe_uninit_slice_with_suffix_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])
fn unpack_slice(buf: &[Self]) -> &[Self::Value]
Source§impl<F, const N: usize> PartialEq for FieldArray<F, N>
impl<F, const N: usize> PartialEq for FieldArray<F, N>
Source§impl<F, const N: usize> Product for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Product for FieldArray<F, N>where
F: Field,
Source§fn product<I>(iter: I) -> FieldArray<F, N>where
I: Iterator<Item = FieldArray<F, N>>,
fn product<I>(iter: I) -> FieldArray<F, N>where
I: Iterator<Item = FieldArray<F, N>>,
Takes an iterator and generates
Self
from the elements by multiplying
the items.Source§impl<F, const N: usize> Sub for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Sub for FieldArray<F, N>where
F: Field,
Source§type Output = FieldArray<F, N>
type Output = FieldArray<F, N>
The resulting type after applying the
-
operator.Source§fn sub(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Sub>::Output
fn sub(self, rhs: FieldArray<F, N>) -> <FieldArray<F, N> as Sub>::Output
Performs the
-
operation. Read moreSource§impl<F, const N: usize> SubAssign<F> for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> SubAssign<F> for FieldArray<F, N>where
F: Field,
Source§fn sub_assign(&mut self, rhs: F)
fn sub_assign(&mut self, rhs: F)
Performs the
-=
operation. Read moreSource§impl<F, const N: usize> SubAssign for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> SubAssign for FieldArray<F, N>where
F: Field,
Source§fn sub_assign(&mut self, rhs: FieldArray<F, N>)
fn sub_assign(&mut self, rhs: FieldArray<F, N>)
Performs the
-=
operation. Read moreSource§impl<F, const N: usize> Sum for FieldArray<F, N>where
F: Field,
impl<F, const N: usize> Sum for FieldArray<F, N>where
F: Field,
Source§fn sum<I>(iter: I) -> FieldArray<F, N>where
I: Iterator<Item = FieldArray<F, N>>,
fn sum<I>(iter: I) -> FieldArray<F, N>where
I: Iterator<Item = FieldArray<F, N>>,
Takes an iterator and generates
Self
from the elements by “summing up”
the items.