Trait snarkvm_wasm::Sub[][src]

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

Returns subtraction of self - other in the constraint system.

Associated Types

Required methods

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

Implementors

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

type ErrorType = SignedIntegerError

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

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

type ErrorType = SignedIntegerError

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

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

type ErrorType = SignedIntegerError

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

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

type ErrorType = SignedIntegerError

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

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

type ErrorType = SignedIntegerError

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