HeapArray

Struct HeapArray 

Source
pub struct HeapArray<T: Sized, M: Positive> { /* private fields */ }
Expand description

An array on the heap that encodes its length in the type system.

Implementations§

Source§

impl<T: Pod, M: Positive> HeapArray<T, M>

Source

pub fn into_box_bytes(self) -> BoxBytes

Source

pub fn from_box_bytes(buf: BoxBytes) -> Self

Source§

impl<T: Sized, M: Positive> HeapArray<T, M>

Source

pub fn map<F, U>(self, f: F) -> HeapArray<U, M>
where F: FnMut(T) -> U,

Source§

impl<T: Sized + Default, M: Positive> HeapArray<T, M>

Source

pub fn from_single_value(val: T) -> Self

Source§

impl<T: Sized + Copy, M: Positive> HeapArray<T, M>

Source

pub fn split<M1, M2>(&self) -> (HeapArray<T, M1>, HeapArray<T, M2>)
where M1: Positive, M2: Positive + Add<M1, Output = M>,

Source

pub fn split_halves<MDiv2>(&self) -> (HeapArray<T, MDiv2>, HeapArray<T, MDiv2>)
where MDiv2: Positive + Mul<U2, Output = M>,

Source

pub fn merge_halves(this: Self, other: Self) -> HeapArray<T, Prod<M, U2>>
where M: Mul<U2, Output: Positive>,

Source

pub fn split3<M1, M2, M3>( &self, ) -> (HeapArray<T, M1>, HeapArray<T, M2>, HeapArray<T, M3>)
where M1: Positive, M2: Positive + Add<M1>, M3: Positive + Add<Sum<M2, M1>, Output = M>,

Source

pub fn split_thirds<MDiv3>( &self, ) -> (HeapArray<T, MDiv3>, HeapArray<T, MDiv3>, HeapArray<T, MDiv3>)
where MDiv3: Positive + Mul<U3, Output = M>,

Source

pub fn merge_thirds( first: Self, second: Self, third: Self, ) -> HeapArray<T, Prod<M, U3>>
where M: Mul<U3, Output: Positive>,

Source§

impl<T: Sized, M: Positive> HeapArray<T, M>

Source

pub fn split_last<N: Positive>( self, ) -> (HeapArray<T, Diff<M, N>>, HeapArray<T, N>)
where M: Sub<N, Output: Positive>,

Source

pub fn from_fn(f: impl FnMut(usize) -> T) -> Self

Source

pub fn from_constant(c: T) -> Self
where T: Copy,

Source§

impl<T: Sized + Default + Field, M: Positive> HeapArray<T, M>

Source

pub fn square(&self) -> Self

Squares each element in the array.

Source

pub fn double(&self) -> Self

Doubles each element in the array.

Source

pub fn invert(&self) -> Option<Self>

Inverts each element in the array.

Source

pub fn pow<S: AsRef<[u64]> + Clone>(&self, exp: S) -> Self

Exponentiates self by exp, where exp is a little-endian order integer exponent.

Source§

impl<T: Sized + ConditionallySelectable, M: Positive> HeapArray<T, M>

Source

pub fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Select a or b according to choice.

§Returns
  • a if choice == Choice(0);
  • b if choice == Choice(1).
Source§

impl<T: Sized + ConditionallySelectable, M: Positive, L: Positive> HeapArray<HeapArray<T, M>, L>

Source

pub fn conditional_select_2d(a: &Self, b: &Self, choice: Choice) -> Self

Select a or b according to choice.

§Returns
  • a if choice == Choice(0);
  • b if choice == Choice(1).

Trait Implementations§

Source§

impl<T, M: Positive> Add<&HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Add<&'b T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &HeapArray<T, M>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> Add<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> Add<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, other: &HeapArray<T, M>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> Add<&T> for HeapArray<T, M>
where T: for<'a> Add<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, other: &T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> Add<HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Add<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> Add<T> for HeapArray<T, M>
where T: for<'a> Add<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> Add for HeapArray<T, M>
where T: for<'b> Add<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, M: Positive> AddAssign<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> AddAssign<&'b T> + Sized,

Source§

fn add_assign(&mut self, other: &Self)

Performs the += operation. Read more
Source§

impl<T, M: Positive> AddAssign<&T> for HeapArray<T, M>
where T: for<'a> AddAssign<&'a T> + Sized,

Source§

fn add_assign(&mut self, other: &T)

Performs the += operation. Read more
Source§

impl<T, M: Positive> AddAssign<T> for HeapArray<T, M>
where T: for<'a> AddAssign<&'a T> + Sized,

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl<T, M: Positive> AddAssign for HeapArray<T, M>
where T: for<'b> AddAssign<&'b T> + Sized,

Source§

fn add_assign(&mut self, rhs: HeapArray<T, M>)

Performs the += operation. Read more
Source§

impl<T: Sized, M: Positive, __AsT: ?Sized> AsMut<__AsT> for HeapArray<T, M>
where Box<[T]>: AsMut<__AsT>,

Source§

fn as_mut(&mut self) -> &mut __AsT

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T: Sized, M: Positive, __AsT: ?Sized> AsRef<__AsT> for HeapArray<T, M>
where Box<[T]>: AsRef<__AsT>,

Source§

fn as_ref(&self) -> &__AsT

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Clone + Sized, M: Clone + Positive> Clone for HeapArray<T, M>

Source§

fn clone(&self) -> HeapArray<T, M>

Returns a duplicate 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<T, M: Positive> ConstantTimeEq for HeapArray<T, M>
where T: ConstantTimeEq + Sized,

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
Source§

impl<T: Sized + Debug, M: Positive> Debug for HeapArray<T, M>

Source§

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

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

impl<T: Sized + Default, M: Positive> Default for HeapArray<T, M>

Source§

fn default() -> Self

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

impl<T: Sized, M: Positive> Deref for HeapArray<T, M>

Source§

type Target = Box<[T]>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T: Sized, M: Positive> DerefMut for HeapArray<T, M>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'de, T: Sized + Deserialize<'de>, M: Positive> Deserialize<'de> for HeapArray<T, M>

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T, M: Positive> Display for HeapArray<T, M>
where T: Display + Sized,

Source§

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

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

impl<T: Sized + Clone, M: Positive + ArraySize> From<Array<T, M>> for HeapArray<T, M>

Source§

fn from(array: Array<T, M>) -> Self

Converts to this type from the input type.
Source§

impl<F: FieldExtension, M: Positive> From<HeapArray<FieldShare<F>, M>> for FieldShares<F, M>

Source§

fn from(shares: HeapArray<FieldShare<F>, M>) -> Self

Converts to this type from the input type.
Source§

impl<T: Sized, M: Positive> From<HeapArray<T, M>> for Vec<T>

Source§

fn from(array: HeapArray<T, M>) -> Self

Converts to this type from the input type.
Source§

impl<T: Sized> From<T> for HeapArray<T, U1>

Source§

fn from(element: T) -> Self

Converts to this type from the input type.
Source§

impl<T: Sized, M: Positive> FromIterator<T> for HeapArray<T, M>

Source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<'__deriveMoreLifetime, T: Sized, M: Positive> IntoIterator for &'__deriveMoreLifetime HeapArray<T, M>
where &'__deriveMoreLifetime Box<[T]>: IntoIterator,

Source§

type Item = <&'__deriveMoreLifetime Box<[T]> as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'__deriveMoreLifetime Box<[T]> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'__deriveMoreLifetime, T: Sized, M: Positive> IntoIterator for &'__deriveMoreLifetime mut HeapArray<T, M>
where &'__deriveMoreLifetime mut Box<[T]>: IntoIterator,

Source§

type Item = <&'__deriveMoreLifetime mut Box<[T]> as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <&'__deriveMoreLifetime mut Box<[T]> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T: Sized, M: Positive> IntoIterator for HeapArray<T, M>

Source§

type Item = <Box<[T]> as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <Box<[T]> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T: Sized + Send, M: Positive> IntoParallelIterator for HeapArray<T, M>

Source§

type Item = T

The type of item that the parallel iterator will produce.
Source§

type Iter = IntoIter<T>

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> Self::Iter

Converts self into a parallel iterator. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &CurveKeys<C, M>
where CurveKeys<C, M>: Clone,

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
where CurvePoints<C, M>: Clone,

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &PointShares<C, M>
where PointShares<C, M>: Clone,

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<FieldElement<F>, M>> for FieldShareKeys<F, M>

Source§

type Output = FieldShareKeys<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a FieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &ScalarKeys<C, M>
where ScalarKeys<C, M>: Clone,

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &ScalarShares<C, M>
where ScalarShares<C, M>: Clone,

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &ScalarsAsExtension<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &Scalars<C, M>
where Scalars<C, M>: Clone,

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for ScalarKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for ScalarShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for ScalarsAsExtension<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for Scalars<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &CurveKeys<C, M>
where CurveKeys<C, M>: Clone,

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
where CurvePoints<C, M>: Clone,

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &PointShares<C, M>
where PointShares<C, M>: Clone,

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for &FieldShares<F, M>
where FieldShares<F, M>: Clone,

Source§

type Output = FieldShares<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for FieldShareKeys<F, M>

Source§

type Output = FieldShareKeys<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for FieldShares<F, M>

Source§

type Output = FieldShares<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a SubfieldElements<F, M>) -> FieldShares<F, M>

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>

Source§

type Output = HeapArray<FieldElement<F>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<&HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Mul<&'b T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &HeapArray<T, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> Mul<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &HeapArray<T, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<&T> for &HeapArray<T, M>
where T: for<'a> Mul<&'a T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<&T> for HeapArray<T, M>
where T: for<'a> Mul<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &T) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
where CurvePoints<C, M>: Clone,

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarsAsExtension<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: FieldExtension, M: Positive> Mul<HeapArray<FieldElement<F>, M>> for FieldShareKeys<F, M>

Source§

type Output = FieldShareKeys<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: FieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for &ScalarKeys<C, M>
where ScalarKeys<C, M>: Clone,

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for &ScalarShares<C, M>
where ScalarShares<C, M>: Clone,

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for &ScalarsAsExtension<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for &Scalars<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for ScalarKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for ScalarShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for ScalarsAsExtension<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<Point<C>, M>> for Scalars<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CurvePoints<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
where CurvePoints<C, M>: Clone,

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

type Output = CurveKeys<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

type Output = HeapArray<Point<C>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

type Output = PointShares<C, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalars<C, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for &FieldShares<F, M>
where FieldShares<F, M>: Clone,

Source§

type Output = FieldShares<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for FieldShareKeys<F, M>

Source§

type Output = FieldShareKeys<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, other: SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for FieldShares<F, M>

Source§

type Output = FieldShares<F, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>

Source§

type Output = HeapArray<FieldElement<F>, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SubfieldElements<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Mul<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<T> for &HeapArray<T, M>
where T: for<'a> Mul<&'a T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul<T> for HeapArray<T, M>
where T: for<'a> Mul<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, M: Positive> Mul for HeapArray<T, M>
where T: for<'b> Mul<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

fn mul_assign(&mut self, rhs: &'a ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

fn mul_assign(&mut self, other: &'a ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

fn mul_assign(&mut self, other: &'a ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

fn mul_assign(&mut self, rhs: &'a Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

fn mul_assign(&mut self, other: &'a Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

fn mul_assign(&mut self, other: &'a Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<F>, M>> for FieldShareKeys<F, M>

Source§

fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)

Performs the *= operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<F>, M>> for FieldShares<F, M>

Source§

fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)

Performs the *= operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>

Source§

fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)

Performs the *= operation. Read more
Source§

impl<T, M: Positive> MulAssign<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> MulAssign<&'b T> + Sized,

Source§

fn mul_assign(&mut self, other: &Self)

Performs the *= operation. Read more
Source§

impl<T, M: Positive> MulAssign<&T> for HeapArray<T, M>
where T: for<'a> MulAssign<&'a T> + Sized,

Source§

fn mul_assign(&mut self, other: &T)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

fn mul_assign(&mut self, rhs: ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

fn mul_assign(&mut self, rhs: ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

fn mul_assign(&mut self, rhs: ScalarsAsExtension<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>

Source§

fn mul_assign(&mut self, rhs: Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>

Source§

fn mul_assign(&mut self, rhs: Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, C: Curve, M: Positive> MulAssign<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for PointShares<C, M>

Source§

fn mul_assign(&mut self, rhs: Scalars<C, M>)

Performs the *= operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> MulAssign<HeapArray<SubfieldElement<F>, M>> for FieldShares<F, M>

Source§

fn mul_assign(&mut self, rhs: SubfieldElements<F, M>)

Performs the *= operation. Read more
Source§

impl<'a, F: FieldExtension, M: Positive> MulAssign<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>

Source§

fn mul_assign(&mut self, rhs: SubfieldElements<F, M>)

Performs the *= operation. Read more
Source§

impl<T, M: Positive> MulAssign<T> for HeapArray<T, M>
where T: for<'a> MulAssign<&'a T> + Sized,

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T, M: Positive> MulAssign for HeapArray<T, M>
where T: for<'b> MulAssign<&'b T> + Sized,

Source§

fn mul_assign(&mut self, rhs: HeapArray<T, M>)

Performs the *= operation. Read more
Source§

impl<T, M: Positive> Neg for &HeapArray<T, M>
where T: Neg<Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T, M: Positive> Neg for HeapArray<T, M>
where T: Neg<Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: Sized + Default + One + Eq + for<'b> Mul<&'b T, Output = T>, M: Positive + Eq> One for HeapArray<T, M>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl<T, M: Positive> PartialEq for HeapArray<T, M>
where T: PartialEq + Sized,

Source§

fn eq(&self, other: &Self) -> 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<T: Sized + Random, M: Positive> Random for HeapArray<T, M>

Source§

fn random(rng: impl CryptoRngCore) -> Self

Generate a random array of length M.

Source§

fn random_n<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, ) -> Container

Source§

impl<C: Curve, M: Positive> RandomWith<HeapArray<Point<C>, M>> for PointShares<C, M>

Source§

fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties: usize, value: CurvePoints<C, M>, ) -> Container

Secret share a value among n parties, generating an authenticated share for each peer with consistent MACs and keys across all peers.

Source§

fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties_and_value: impl IntoExactSizeIterator<Item = CurvePoints<C, M>>, ) -> Container

Generate a random field share with a specific secret share as value, with consistent random MACs and keys across all peers.

Source§

fn random_with(_rng: impl CryptoRngCore, _data: CurvePoints<C, M>) -> Self

Source§

impl<F: FieldExtension, M: Positive> RandomWith<HeapArray<SubfieldElement<F>, M>> for FieldShares<F, M>

Source§

fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties: usize, value: SubfieldElements<F, M>, ) -> Container

Secret share a value among n parties, generating an authenticated share for each peer with consistent MACs and keys across all peers.

Source§

fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, unauth_shares: impl IntoExactSizeIterator<Item = SubfieldElements<F, M>>, ) -> Container

Generate an authenticated share given for each peer given its additve share with consistent MACs and keys across all peers.

Source§

fn random_with(_rng: impl CryptoRngCore, _data: SubfieldElements<F, M>) -> Self

Source§

impl<T: Sized + Serialize, M: Positive> Serialize for HeapArray<T, M>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<T, M: Positive> Sub<&HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Sub<&'b T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &HeapArray<T, M>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> Sub<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &HeapArray<T, M>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<&T> for &HeapArray<T, M>
where T: for<'a> Sub<&'a T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<&T> for HeapArray<T, M>
where T: for<'a> Sub<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<HeapArray<T, M>> for &HeapArray<T, M>
where T: for<'b> Sub<&'b T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<T> for &HeapArray<T, M>
where T: for<'a> Sub<&'a T, Output = T> + Sized, HeapArray<T, M>: Clone,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub<T> for HeapArray<T, M>
where T: for<'a> Sub<&'a T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> Sub for HeapArray<T, M>
where T: for<'b> Sub<&'b T, Output = T> + Sized,

Source§

type Output = HeapArray<T, M>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: HeapArray<T, M>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, M: Positive> SubAssign<&HeapArray<T, M>> for HeapArray<T, M>
where T: for<'b> SubAssign<&'b T> + Sized,

Source§

fn sub_assign(&mut self, other: &Self)

Performs the -= operation. Read more
Source§

impl<T, M: Positive> SubAssign<&T> for HeapArray<T, M>
where T: for<'a> SubAssign<&'a T> + Sized,

Source§

fn sub_assign(&mut self, other: &T)

Performs the -= operation. Read more
Source§

impl<T, M: Positive> SubAssign<T> for HeapArray<T, M>
where T: for<'a> SubAssign<&'a T> + Sized,

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
Source§

impl<T, M: Positive> SubAssign for HeapArray<T, M>
where T: for<'b> SubAssign<&'b T> + Sized,

Source§

fn sub_assign(&mut self, rhs: HeapArray<T, M>)

Performs the -= operation. Read more
Source§

impl<T: Clone + Default + for<'b> Add<&'b T, Output = T>, M: Positive> Sum for HeapArray<T, M>

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

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

impl<T: Sized, M: Positive> TryFrom<Vec<T>> for HeapArray<T, M>

Source§

type Error = PrimitiveError

The type returned in the event of a conversion error.
Source§

fn try_from(data: Vec<T>) -> Result<Self, PrimitiveError>

Performs the conversion.
Source§

impl<T: Clone + Zero + Eq + for<'b> Add<&'b T, Output = T>, M: Positive + Eq> Zero for HeapArray<T, M>

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<T: Eq + Sized, M: Eq + Positive> Eq for HeapArray<T, M>

Auto Trait Implementations§

§

impl<T, M> Freeze for HeapArray<T, M>

§

impl<T, M> RefUnwindSafe for HeapArray<T, M>
where T: RefUnwindSafe,

§

impl<T, M> Send for HeapArray<T, M>
where T: Send,

§

impl<T, M> Sync for HeapArray<T, M>
where T: Sync,

§

impl<T, M> Unpin for HeapArray<T, M>

§

impl<T, M> UnwindSafe for HeapArray<T, M>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

Source§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where O: BitOrder,

Views self as an immutable bit-slice region with the O ordering.
Source§

fn try_as_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where O: BitOrder,

Attempts to view self as an immutable bit-slice region with the O ordering. Read more
Source§

impl<A, T> AsMutBits<T> for A
where A: AsMut<[T]>, T: BitStore,

Source§

fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O>
where O: BitOrder,

Views self as a mutable bit-slice region with the O ordering.
Source§

fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where O: BitOrder,

Attempts to view self as a mutable bit-slice region with the O ordering. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<'a, F, I> BatchInvert<F> for I
where F: Field + ConstantTimeEq, I: IntoIterator<Item = &'a mut F>,

Source§

fn batch_invert(self) -> F

Consumes this iterator and inverts each field element (when nonzero). Zero-valued elements are left as zero. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Reconstructible for T

Source§

type Opening = T

The type that is sent to / received from other peers.
Source§

type Secret = T

The type of the reconstructed value.
Source§

fn open_to( &self, _peer_index: usize, ) -> Result<<T as Reconstructible>::Opening, PrimitiveError>

Open the share towards another peer.
Source§

fn open_to_all_others(&self) -> impl ExactSizeIterator

Open the share towards all other peers. Returns an iterator with either one opening for each peer or a single opening for all peers.
Source§

fn reconstruct( &self, openings: &[<T as Reconstructible>::Opening], ) -> Result<<T as Reconstructible>::Secret, PrimitiveError>

Reconstruct a secret from openings coming from all other parties.
Source§

fn reconstruct_all<S>( shares: &[S], ) -> Result<<T as Reconstructible>::Secret, PrimitiveError>
where S: Borrow<T>,

Reconstruct a secret from a collection of shares, by opening each share towards all other peers, reconstructing n secrets from the openings and checking that they are all equal.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca)
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

Source§

impl<T, S> IntoExactSizeIterator for T
where T: IntoIterator<IntoIter = S>, S: ExactSizeIterator<Item = <T as IntoIterator>::Item>,

Source§

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,