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>
impl<T: Pod, M: Positive> HeapArray<T, M>
pub fn into_box_bytes(self) -> BoxBytes
pub fn from_box_bytes(buf: BoxBytes) -> Self
Source§impl<T: Sized + Default, M: Positive> HeapArray<T, M>
impl<T: Sized + Default, M: Positive> HeapArray<T, M>
pub fn from_single_value(val: T) -> Self
Source§impl<T: Sized + Copy, M: Positive> HeapArray<T, M>
impl<T: Sized + Copy, M: Positive> HeapArray<T, M>
pub fn split<M1, M2>(&self) -> (HeapArray<T, M1>, HeapArray<T, M2>)
pub fn split_halves<MDiv2>(&self) -> (HeapArray<T, MDiv2>, HeapArray<T, MDiv2>)
pub fn merge_halves(this: Self, other: Self) -> HeapArray<T, Prod<M, U2>>
pub fn split3<M1, M2, M3>( &self, ) -> (HeapArray<T, M1>, HeapArray<T, M2>, HeapArray<T, M3>)
pub fn split_thirds<MDiv3>( &self, ) -> (HeapArray<T, MDiv3>, HeapArray<T, MDiv3>, HeapArray<T, MDiv3>)
pub fn merge_thirds( first: Self, second: Self, third: Self, ) -> HeapArray<T, Prod<M, U3>>
Source§impl<T: Sized + ConditionallySelectable, M: Positive> HeapArray<T, M>
impl<T: Sized + ConditionallySelectable, M: Positive> HeapArray<T, M>
Sourcepub fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
pub fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Trait Implementations§
Source§impl<T, M: Positive> AddAssign<&HeapArray<T, M>> for HeapArray<T, M>
impl<T, M: Positive> AddAssign<&HeapArray<T, M>> for HeapArray<T, M>
Source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moreSource§impl<T, M: Positive> AddAssign<&T> for HeapArray<T, M>
impl<T, M: Positive> AddAssign<&T> for HeapArray<T, M>
Source§fn add_assign(&mut self, other: &T)
fn add_assign(&mut self, other: &T)
Performs the
+= operation. Read moreSource§impl<T, M: Positive> AddAssign<T> for HeapArray<T, M>
impl<T, M: Positive> AddAssign<T> for HeapArray<T, M>
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Performs the
+= operation. Read moreSource§impl<T, M: Positive> AddAssign for HeapArray<T, M>
impl<T, M: Positive> AddAssign for HeapArray<T, M>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl<T: Sized, M: Positive, __AsT: ?Sized> AsMut<__AsT> for HeapArray<T, M>
impl<T: Sized, M: Positive, __AsT: ?Sized> AsMut<__AsT> for HeapArray<T, M>
Source§fn as_mut(&mut self) -> &mut __AsT
fn as_mut(&mut self) -> &mut __AsT
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<T, M: Positive> ConstantTimeEq for HeapArray<T, M>where
T: ConstantTimeEq + Sized,
impl<T, M: Positive> ConstantTimeEq for HeapArray<T, M>where
T: ConstantTimeEq + Sized,
Source§impl<'de, T: Sized + Deserialize<'de>, M: Positive> Deserialize<'de> for HeapArray<T, M>
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>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§fn from(shares: HeapArray<FieldShare<F>, M>) -> Self
fn from(shares: HeapArray<FieldShare<F>, M>) -> Self
Converts to this type from the input type.
Source§impl<T: Sized, M: Positive> FromIterator<T> for HeapArray<T, M>
impl<T: Sized, M: Positive> FromIterator<T> for HeapArray<T, M>
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
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>
impl<'__deriveMoreLifetime, T: Sized, M: Positive> IntoIterator for &'__deriveMoreLifetime HeapArray<T, M>
Source§impl<'__deriveMoreLifetime, T: Sized, M: Positive> IntoIterator for &'__deriveMoreLifetime mut HeapArray<T, M>
impl<'__deriveMoreLifetime, T: Sized, M: Positive> IntoIterator for &'__deriveMoreLifetime mut HeapArray<T, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &'a CurveKeys<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &'a CurveKeys<C, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &'a CurvePoints<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &'a CurvePoints<C, M>
Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§type Output = FieldShareKeys<F, M>
type Output = FieldShareKeys<F, M>
The resulting type after applying the
* operator.Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &'a ScalarsAsExtension<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<Point<C>, M>> for &'a ScalarsAsExtension<C, M>
Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &'a CurveKeys<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &'a CurveKeys<C, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &'a CurvePoints<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &'a CurvePoints<C, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
Source§impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<'a, C: Curve, M: Positive> Mul<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§type Output = FieldShares<F, M>
type Output = FieldShares<F, M>
The resulting type after applying the
* operator.Source§fn mul(self, other: &'a SubfieldElements<F, M>) -> FieldShares<F, M>
fn mul(self, other: &'a SubfieldElements<F, M>) -> FieldShares<F, M>
Performs the
* operation. Read moreSource§type Output = FieldShareKeys<F, M>
type Output = FieldShareKeys<F, M>
The resulting type after applying the
* operator.Source§type Output = FieldShares<F, M>
type Output = FieldShares<F, M>
The resulting type after applying the
* operator.Source§fn mul(self, other: &'a SubfieldElements<F, M>) -> FieldShares<F, M>
fn mul(self, other: &'a SubfieldElements<F, M>) -> FieldShares<F, M>
Performs the
* operation. Read moreSource§impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
impl<'a, F: FieldExtension, M: Positive> Mul<&'a HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
Source§impl<C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
impl<C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
Source§impl<C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<C: Curve, M: Positive> Mul<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§type Output = FieldShareKeys<F, M>
type Output = FieldShareKeys<F, M>
The resulting type after applying the
* operator.Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§type Output = PointShares<C, M>
type Output = PointShares<C, M>
The resulting type after applying the
* operator.Source§impl<C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
impl<C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for &CurvePoints<C, M>
Source§impl<C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<C: Curve, M: Positive> Mul<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§type Output = FieldShares<F, M>
type Output = FieldShares<F, M>
The resulting type after applying the
* operator.Source§fn mul(self, other: SubfieldElements<F, M>) -> FieldShares<F, M>
fn mul(self, other: SubfieldElements<F, M>) -> FieldShares<F, M>
Performs the
* operation. Read moreSource§type Output = FieldShareKeys<F, M>
type Output = FieldShareKeys<F, M>
The resulting type after applying the
* operator.Source§impl<F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
impl<F: FieldExtension, M: Positive> Mul<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
Source§impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
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>)
fn mul_assign(&mut self, rhs: &'a ScalarsAsExtension<C, M>)
Performs the
*= operation. Read moreSource§impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
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>)
fn mul_assign(&mut self, other: &'a ScalarsAsExtension<C, M>)
Performs the
*= operation. Read moreSource§fn mul_assign(&mut self, other: &'a ScalarsAsExtension<C, M>)
fn mul_assign(&mut self, other: &'a ScalarsAsExtension<C, M>)
Performs the
*= operation. Read moreSource§impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurveKeys<C, M>
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>)
fn mul_assign(&mut self, rhs: &'a Scalars<C, M>)
Performs the
*= operation. Read moreSource§impl<'a, C: Curve, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
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>)
fn mul_assign(&mut self, other: &'a Scalars<C, M>)
Performs the
*= operation. Read moreSource§fn mul_assign(&mut self, other: &'a Scalars<C, M>)
fn mul_assign(&mut self, other: &'a Scalars<C, M>)
Performs the
*= operation. Read moreSource§fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)
fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)
Performs the
*= operation. Read moreSource§fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)
fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)
Performs the
*= operation. Read moreSource§impl<'a, F: FieldExtension, M: Positive> MulAssign<&'a HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
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>)
fn mul_assign(&mut self, other: &'a SubfieldElements<F, M>)
Performs the
*= operation. Read moreSource§impl<T, M: Positive> MulAssign<&HeapArray<T, M>> for HeapArray<T, M>
impl<T, M: Positive> MulAssign<&HeapArray<T, M>> for HeapArray<T, M>
Source§fn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*= operation. Read moreSource§impl<T, M: Positive> MulAssign<&T> for HeapArray<T, M>
impl<T, M: Positive> MulAssign<&T> for HeapArray<T, M>
Source§fn mul_assign(&mut self, other: &T)
fn mul_assign(&mut self, other: &T)
Performs the
*= operation. Read moreSource§impl<C: Curve, M: Positive> MulAssign<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<C: Curve, M: Positive> MulAssign<HeapArray<FieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§fn mul_assign(&mut self, other: ScalarsAsExtension<C, M>)
fn mul_assign(&mut self, other: ScalarsAsExtension<C, M>)
Performs the
*= operation. Read moreSource§impl<C: Curve, M: Positive> MulAssign<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
impl<C: Curve, M: Positive> MulAssign<HeapArray<SubfieldElement<<C as Curve>::Scalar>, M>> for CurvePoints<C, M>
Source§fn mul_assign(&mut self, other: Scalars<C, M>)
fn mul_assign(&mut self, other: Scalars<C, M>)
Performs the
*= operation. Read moreSource§impl<F: FieldExtension, M: Positive> MulAssign<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
impl<F: FieldExtension, M: Positive> MulAssign<HeapArray<SubfieldElement<F>, M>> for FieldElements<F, M>
Source§fn mul_assign(&mut self, other: SubfieldElements<F, M>)
fn mul_assign(&mut self, other: SubfieldElements<F, M>)
Performs the
*= operation. Read moreSource§impl<T, M: Positive> MulAssign<T> for HeapArray<T, M>
impl<T, M: Positive> MulAssign<T> for HeapArray<T, M>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*= operation. Read moreSource§impl<T, M: Positive> MulAssign for HeapArray<T, M>
impl<T, M: Positive> MulAssign for HeapArray<T, M>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl<T: Sized + Random, M: Positive> Random for HeapArray<T, M>
impl<T: Sized + Random, M: Positive> Random for HeapArray<T, M>
Source§fn random(rng: impl CryptoRngCore) -> Self
fn random(rng: impl CryptoRngCore) -> Self
Generate a random array of length M.
fn random_n<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, ) -> Container
Source§fn random_n_with<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
n_parties: usize,
value: CurvePoints<C, M>,
) -> Container
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
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.
fn random_with(_rng: impl CryptoRngCore, _data: CurvePoints<C, M>) -> Self
Source§fn random_n_with<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
n_parties: usize,
value: SubfieldElements<F, M>,
) -> Container
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
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.
fn random_with(_rng: impl CryptoRngCore, _data: SubfieldElements<F, M>) -> Self
Source§impl<T, M: Positive> SubAssign<&HeapArray<T, M>> for HeapArray<T, M>
impl<T, M: Positive> SubAssign<&HeapArray<T, M>> for HeapArray<T, M>
Source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-= operation. Read moreSource§impl<T, M: Positive> SubAssign<&T> for HeapArray<T, M>
impl<T, M: Positive> SubAssign<&T> for HeapArray<T, M>
Source§fn sub_assign(&mut self, other: &T)
fn sub_assign(&mut self, other: &T)
Performs the
-= operation. Read moreSource§impl<T, M: Positive> SubAssign<T> for HeapArray<T, M>
impl<T, M: Positive> SubAssign<T> for HeapArray<T, M>
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-= operation. Read moreSource§impl<T, M: Positive> SubAssign for HeapArray<T, M>
impl<T, M: Positive> SubAssign for HeapArray<T, M>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreSource§impl<T: Sized, M: Positive> TryFrom<Vec<T>> for HeapArray<T, M>
impl<T: Sized, M: Positive> TryFrom<Vec<T>> for HeapArray<T, M>
Source§type Error = PrimitiveError
type Error = PrimitiveError
The type returned in the event of a conversion error.
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<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
Source§impl<A, T> AsMutBits<T> for A
impl<A, T> AsMutBits<T> for A
Source§fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O>where
O: BitOrder,
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,
fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, F, I> BatchInvert<F> for I
impl<'a, F, I> BatchInvert<F> for I
Source§fn batch_invert(self) -> F
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> 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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
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,
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,
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,
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,
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,
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,
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,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
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) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Reconstructible for T
impl<T> Reconstructible for T
Source§fn open_to(
&self,
_peer_index: usize,
) -> Result<<T as Reconstructible>::Opening, PrimitiveError>
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
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>
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>,
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> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
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
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
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
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
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
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
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
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) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)