Type Alias Digest

Source
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<F> for FieldArray<F, N>
where F: Field,

Source§

type Output = FieldArray<F, N>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: F) -> <FieldArray<F, N> as Add<F>>::Output

Performs the + operation. Read more
Source§

impl<F, const N: usize> Add for FieldArray<F, N>
where F: Field,

Source§

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

Performs the + operation. Read more
Source§

impl<F, const N: usize> AddAssign<F> for FieldArray<F, N>
where F: Field,

Source§

fn add_assign(&mut self, rhs: F)

Performs the += operation. Read more
Source§

impl<F, const N: usize> AddAssign for FieldArray<F, N>
where F: Field,

Source§

fn add_assign(&mut self, rhs: FieldArray<F, N>)

Performs the += operation. Read more
Source§

impl<F, const N: usize> Clone for FieldArray<F, N>
where F: Clone + Field,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<F, const N: usize> Debug for FieldArray<F, N>
where F: Debug + Field,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<F, const N: usize> Default for FieldArray<F, N>
where F: Field,

Source§

fn default() -> FieldArray<F, N>

Returns the “default value” for a type. Read more
Source§

impl<F, const N: usize> Div<F> for FieldArray<F, N>
where F: Field,

Source§

type Output = FieldArray<F, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: F) -> <FieldArray<F, N> as Div<F>>::Output

Performs the / operation. Read more
Source§

impl<F, const N: usize> FieldAlgebra for FieldArray<F, N>
where F: Field,

Source§

const ZERO: FieldArray<F, N>

The additive identity of the algebra. Read more
Source§

const ONE: FieldArray<F, N>

The multiplicative identity of the Algebra Read more
Source§

const TWO: FieldArray<F, N>

The element in the algebra given by ONE + ONE. Read more
Source§

const NEG_ONE: FieldArray<F, N>

The element in the algebra given by -ONE. Read more
Source§

type F = F

Source§

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>

Convert from a canonical u8. Read more
Source§

fn from_canonical_u16(n: u16) -> FieldArray<F, N>

Convert from a canonical u16. Read more
Source§

fn from_canonical_u32(n: u32) -> FieldArray<F, N>

Convert from a canonical u32. Read more
Source§

fn from_canonical_u64(n: u64) -> FieldArray<F, N>

Convert from a canonical u64. Read more
Source§

fn from_canonical_usize(n: usize) -> FieldArray<F, N>

Convert from a canonical usize. Read more
Source§

fn from_wrapped_u32(n: u32) -> FieldArray<F, N>

Source§

fn from_wrapped_u64(n: u64) -> FieldArray<F, N>

Source§

fn from_bool(b: bool) -> Self

Convert from a bool.
Source§

fn double(&self) -> Self

The elementary function double(a) = 2*a. Read more
Source§

fn square(&self) -> Self

The elementary function square(a) = a^2. Read more
Source§

fn cube(&self) -> Self

The elementary function cube(a) = a^3. Read more
Source§

fn exp_u64(&self, power: u64) -> Self

Exponentiation by a u64 power. Read more
Source§

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

Compute self^{2^power_log} by repeated squaring.
Source§

fn mul_2exp_u64(&self, exp: u64) -> Self

self * 2^exp
Source§

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>

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>,

Construct an iterator which returns powers of self packed into PackedField elements. Read more
Source§

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 more
Source§

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>

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 more
Source§

impl<F, const N: usize> From<[F; N]> for FieldArray<F, N>
where F: Field,

Source§

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,

Source§

fn from(val: F) -> FieldArray<F, N>

Converts to this type from the input type.
Source§

impl<F, const N: usize> Mul<F> for FieldArray<F, N>
where F: Field,

Source§

type Output = FieldArray<F, N>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: F) -> <FieldArray<F, N> as Mul<F>>::Output

Performs the * operation. Read more
Source§

impl<F, const N: usize> Mul for FieldArray<F, N>
where F: Field,

Source§

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

Performs the * operation. Read more
Source§

impl<F, const N: usize> MulAssign<F> for FieldArray<F, N>
where F: Field,

Source§

fn mul_assign(&mut self, rhs: F)

Performs the *= operation. Read more
Source§

impl<F, const N: usize> MulAssign for FieldArray<F, N>
where F: Field,

Source§

fn mul_assign(&mut self, rhs: FieldArray<F, N>)

Performs the *= operation. Read more
Source§

impl<F, const N: usize> Neg for FieldArray<F, N>
where F: Field,

Source§

type Output = FieldArray<F, N>

The resulting type after applying the - operator.
Source§

fn neg(self) -> <FieldArray<F, N> as Neg>::Output

Performs the unary - operation. Read more
Source§

impl<F, const N: usize> PackedValue for FieldArray<F, N>
where F: Field,

Source§

const WIDTH: usize = N

Source§

type Value = F

Source§

fn from_slice( slice: &[<FieldArray<F, N> as PackedValue>::Value], ) -> &FieldArray<F, N>

Source§

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>
where Fn: FnMut(usize) -> <FieldArray<F, N> as PackedValue>::Value,

Similar to core:array::from_fn.
Source§

fn as_slice(&self) -> &[<FieldArray<F, N> as PackedValue>::Value]

Source§

fn as_slice_mut(&mut self) -> &mut [<FieldArray<F, N> as PackedValue>::Value]

Source§

fn pack_slice(buf: &[Self::Value]) -> &[Self]

Source§

fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])

Source§

fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]

Source§

fn pack_maybe_uninit_slice_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> &mut [MaybeUninit<Self>]

Source§

fn pack_slice_with_suffix_mut( buf: &mut [Self::Value], ) -> (&mut [Self], &mut [Self::Value])

Source§

fn pack_maybe_uninit_slice_with_suffix_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])

Source§

fn unpack_slice(buf: &[Self]) -> &[Self::Value]

Source§

impl<F, const N: usize> PartialEq for FieldArray<F, N>
where F: PartialEq + Field,

Source§

fn eq(&self, other: &FieldArray<F, N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

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>>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<F, const N: usize> Sub<F> for FieldArray<F, N>
where F: Field,

Source§

type Output = FieldArray<F, N>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: F) -> <FieldArray<F, N> as Sub<F>>::Output

Performs the - operation. Read more
Source§

impl<F, const N: usize> Sub for FieldArray<F, N>
where F: Field,

Source§

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

Performs the - operation. Read more
Source§

impl<F, const N: usize> SubAssign<F> for FieldArray<F, N>
where F: Field,

Source§

fn sub_assign(&mut self, rhs: F)

Performs the -= operation. Read more
Source§

impl<F, const N: usize> SubAssign for FieldArray<F, N>
where F: Field,

Source§

fn sub_assign(&mut self, rhs: FieldArray<F, N>)

Performs the -= operation. Read more
Source§

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>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<F, const N: usize> Copy for FieldArray<F, N>
where F: Copy + Field,

Source§

impl<F, const N: usize> Eq for FieldArray<F, N>
where F: Eq + Field,

Source§

impl<F, const N: usize> StructuralPartialEq for FieldArray<F, N>
where F: Field,