Trait snarkvm_wasm::integers::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>; fn sub_unsafe<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]fn sub_unsafe<CS>(&self, cs: CS, other: &Self) -> Result<Self, Self::ErrorType> where
CS: ConstraintSystem<F>, [src]Implementors
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>, [src]Used for division. Evaluates a - b, and when a - b < 0, returns 0.
type ErrorType = UnsignedIntegerErrorpub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>, [src]Used for division. Evaluates a - b, and when a - b < 0, returns 0.
type ErrorType = UnsignedIntegerErrorpub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>, [src]Used for division. Evaluates a - b, and when a - b < 0, returns 0.
type ErrorType = UnsignedIntegerErrorpub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>, [src]Used for division. Evaluates a - b, and when a - b < 0, returns 0.
type ErrorType = UnsignedIntegerErrorpub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>, [src]Used for division. Evaluates a - b, and when a - b < 0, returns 0.
type ErrorType = UnsignedIntegerError