Trait snarkvm_wasm::Mul[][src]

pub trait Mul<F, Rhs = Self> where
    F: Field
{ type ErrorType; fn mul<CS>(&self, cs: CS, other: &Self) -> Result<Self, Self::ErrorType>
    where
        CS: ConstraintSystem<F>
;
fn mul_unsafe<CS>(
        &self,
        cs: CS,
        other: &Self
    ) -> Result<Self, Self::ErrorType>
    where
        CS: ConstraintSystem<F>
; }
Expand description

Returns multiplication of self * other in the constraint system.

Associated Types

Required methods

fn mul<CS>(&self, cs: CS, other: &Self) -> Result<Self, Self::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

fn mul_unsafe<CS>(&self, cs: CS, other: &Self) -> Result<Self, Self::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

Overflowing mul gadget. Used to calculate exponents in pow gadget.

Implementors

impl<F> Mul<F, Int8> for Int8 where
    F: PrimeField
[src]

Bitwise multiplication of two signed integer objects.

type ErrorType = SignedIntegerError

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Int8
) -> Result<Int8, <Int8 as Mul<F, Int8>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_unsafe<CS>(
    &self,
    cs: CS,
    other: &Int8
) -> Result<Int8, <Int8 as Mul<F, Int8>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> Mul<F, Int16> for Int16 where
    F: PrimeField
[src]

Bitwise multiplication of two signed integer objects.

type ErrorType = SignedIntegerError

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Int16
) -> Result<Int16, <Int16 as Mul<F, Int16>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_unsafe<CS>(
    &self,
    cs: CS,
    other: &Int16
) -> Result<Int16, <Int16 as Mul<F, Int16>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> Mul<F, Int32> for Int32 where
    F: PrimeField
[src]

Bitwise multiplication of two signed integer objects.

type ErrorType = SignedIntegerError

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Int32
) -> Result<Int32, <Int32 as Mul<F, Int32>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_unsafe<CS>(
    &self,
    cs: CS,
    other: &Int32
) -> Result<Int32, <Int32 as Mul<F, Int32>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> Mul<F, Int64> for Int64 where
    F: PrimeField
[src]

Bitwise multiplication of two signed integer objects.

type ErrorType = SignedIntegerError

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Int64
) -> Result<Int64, <Int64 as Mul<F, Int64>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_unsafe<CS>(
    &self,
    cs: CS,
    other: &Int64
) -> Result<Int64, <Int64 as Mul<F, Int64>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> Mul<F, Int128> for Int128 where
    F: PrimeField
[src]

Bitwise multiplication of two signed integer objects.

type ErrorType = SignedIntegerError

pub fn mul<CS>(
    &self,
    cs: CS,
    other: &Int128
) -> Result<Int128, <Int128 as Mul<F, Int128>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]

pub fn mul_unsafe<CS>(
    &self,
    cs: CS,
    other: &Int128
) -> Result<Int128, <Int128 as Mul<F, Int128>>::ErrorType> where
    CS: ConstraintSystem<F>, 
[src]