Struct Scalar

Source
pub struct Scalar(/* private fields */);
Expand description

A wrapper around the inner scalar that allows us to implement foreign traits for the Scalar

Implementations§

Source§

impl Scalar

Source

pub type Field = Fp<MontBackend<StarknetFrConfig, 4>, 4>

The underlying field that the scalar wraps

Source

pub fn zero() -> Scalar

The scalar field’s additive identity

Source

pub fn one() -> Scalar

The scalar field’s multiplicative identity

Source

pub fn inner(&self) -> Fp256<MontBackend<StarknetFrConfig, 4>>

Get the inner value of the scalar

Source

pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Scalar

Generate a random scalar

n.b. The rand::random method uses ThreadRng type which implements the CryptoRng traits

Source

pub fn inverse(&self) -> Scalar

Compute the multiplicative inverse of the scalar in its field

Source

pub fn batch_inverse(vals: &mut [Scalar])

Compute the batch inversion of a list of Scalars

Source

pub fn from_be_bytes_mod_order(bytes: &[u8]) -> Scalar

Construct a scalar from the given bytes and reduce modulo the field’s modulus

Source

pub fn to_bytes_be(&self) -> Vec<u8>

Convert to big endian bytes

Pad to the maximum amount of bytes needed so that the resulting bytes are of predictable length

Source

pub fn to_biguint(&self) -> BigUint

Convert the underlying value to a BigUint

Source

pub fn from_biguint(val: &BigUint) -> Scalar

Convert from a BigUint

Trait Implementations§

Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a MpcScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a MpcScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a MpcScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a MpcScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a ResultHandle<Scalar>> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a ResultHandle<Scalar>> for Scalar

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Scalar> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Scalar> for &MpcScalarResult

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Scalar> for &ScalarResult

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Scalar> for &Scalar

Source§

type Output = Scalar

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Scalar> for MpcScalarResult

lhs owned, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Scalar> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Scalar> for Scalar

lhs owned, rhs borrowed

Source§

type Output = Scalar

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<MpcScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<MpcScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<ResultHandle<Scalar>> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<ResultHandle<Scalar>> for Scalar

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<Scalar> for &'a MpcScalarResult

lhs borrowed, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<Scalar> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<Scalar> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = Scalar

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Scalar> for MpcScalarResult

lhs owned, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Scalar> for ScalarResult

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Scalar

lhs owned, rhs owned

Source§

type Output = Scalar

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign for Scalar

Source§

fn add_assign(&mut self, rhs: Scalar)

Performs the += operation. Read more
Source§

impl Clone for Scalar

Source§

fn clone(&self) -> Scalar

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 Debug for Scalar

Source§

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

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

impl Default for Scalar

Source§

fn default() -> Scalar

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

impl<'de> Deserialize<'de> for Scalar

Source§

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

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

impl Display for Scalar

Source§

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

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

impl From<&ResultValue> for Scalar

Source§

fn from(value: &ResultValue) -> Self

Converts to this type from the input type.
Source§

impl From<ResultValue> for Scalar

Source§

fn from(value: ResultValue) -> Self

Converts to this type from the input type.
Source§

impl From<Scalar> for NetworkPayload

Source§

fn from(scalar: Scalar) -> Self

Converts to this type from the input type.
Source§

impl<T: Into<Fp256<MontBackend<StarknetFrConfig, 4>>>> From<T> for Scalar

Source§

fn from(val: T) -> Self

Converts to this type from the input type.
Source§

impl Hash for Scalar

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedStarkPointResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedStarkPointResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a MpcScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a MpcScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a MpcScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a MpcScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a MpcStarkPointResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a MpcStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a MpcStarkPointResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a MpcStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<Scalar>> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<Scalar>> for Scalar

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<StarkPoint>> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<StarkPoint>> for Scalar

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &AuthenticatedStarkPointResult

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Scalar) -> AuthenticatedStarkPointResult

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &MpcScalarResult

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &MpcStarkPointResult

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &ScalarResult

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &StarkPointResult

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &Scalar

Source§

type Output = Scalar

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &StarkPoint

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for AuthenticatedStarkPointResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for MpcScalarResult

lhs owned, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for MpcStarkPointResult

lhs owned, rhs borrowed

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for StarkPointResult

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for Scalar

lhs owned, rhs borrowed

Source§

type Output = Scalar

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for StarkPoint

lhs owned, rhs borrowed

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a StarkPoint> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a StarkPoint> for Scalar

lhs owned, rhs borrowed

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedStarkPointResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedStarkPointResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<MpcScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<MpcScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<MpcStarkPointResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<MpcStarkPointResult> for Scalar

lhs owned, rhs owned

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<ResultHandle<Scalar>> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<ResultHandle<Scalar>> for Scalar

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<ResultHandle<StarkPoint>> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<ResultHandle<StarkPoint>> for Scalar

lhs owned, rhs owned

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a AuthenticatedStarkPointResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a MpcScalarResult

lhs borrowed, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a MpcStarkPointResult

lhs borrowed, rhs owned

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a StarkPointResult

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = Scalar

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a StarkPoint

lhs borrowed, rhs owned

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for AuthenticatedStarkPointResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for MpcScalarResult

lhs owned, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for MpcStarkPointResult

lhs owned, rhs owned

Source§

type Output = MpcStarkPointResult

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for ScalarResult

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for StarkPointResult

lhs owned, rhs owned

Source§

type Output = ResultHandle<StarkPoint>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Scalar> for StarkPoint

lhs owned, rhs owned

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<StarkPoint> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<StarkPoint> for Scalar

lhs owned, rhs owned

Source§

type Output = StarkPoint

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for Scalar

lhs owned, rhs owned

Source§

type Output = Scalar

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&Scalar> for StarkPoint

Source§

fn mul_assign(&mut self, rhs: &Scalar)

Performs the *= operation. Read more
Source§

impl MulAssign for Scalar

Source§

fn mul_assign(&mut self, rhs: Scalar)

Performs the *= operation. Read more
Source§

impl Neg for &Scalar

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for Scalar

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for Scalar

Source§

fn eq(&self, other: &Scalar) -> 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 Product for Scalar

Source§

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

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

impl Serialize for Scalar

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 Sub<&AuthenticatedScalarResult> for &Scalar

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&MpcScalarResult> for &Scalar

Source§

type Output = MpcScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&ResultHandle<Scalar>> for &Scalar

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a ResultHandle<Scalar>> for Scalar

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a ScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Scalar> for &AuthenticatedScalarResult

Source§

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

As in the case for addition, only party 0 subtracts the public value from their share, but both parties track this in the public modifier

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

impl Sub<&Scalar> for &MpcScalarResult

Source§

type Output = MpcScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Scalar> for &ScalarResult

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Scalar> for &Scalar

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Scalar> for MpcScalarResult

lhs owned, rhs borrowed

Source§

type Output = MpcScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Scalar> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Scalar> for Scalar

lhs owned, rhs borrowed

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<ResultHandle<Scalar>> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<ResultHandle<Scalar>> for Scalar

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<Scalar> for &'a MpcScalarResult

lhs borrowed, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<Scalar> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<Scalar> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Scalar> for MpcScalarResult

lhs owned, rhs owned

Source§

type Output = MpcScalarResult

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Scalar> for ScalarResult

lhs owned, rhs owned

Source§

type Output = ResultHandle<Scalar>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for Scalar

lhs owned, rhs owned

Source§

type Output = Scalar

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign for Scalar

Source§

fn sub_assign(&mut self, rhs: Scalar)

Performs the -= operation. Read more
Source§

impl Sum for Scalar

Source§

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

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

impl Copy for Scalar

Source§

impl Eq for Scalar

Source§

impl StructuralPartialEq for Scalar

Auto Trait Implementations§

§

impl Freeze for Scalar

§

impl RefUnwindSafe for Scalar

§

impl Send for Scalar

§

impl Sync for Scalar

§

impl Unpin for Scalar

§

impl UnwindSafe for Scalar

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<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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
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> 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<T> Same for T

Source§

type Output = T

Should always be Self
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, 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>,