Trait snarkvm_wasm::traits::utilities::uint::Sub [−][src]
Returns subtraction of self - other in the constraint system.
Associated Types
Loading content...Required methods
pub fn sub<CS>(&self, cs: CS, other: &Self) -> Result<Self, Self::ErrorType> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &Self
) -> Result<Self, Self::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &Self
) -> Result<Self, Self::ErrorType> where
CS: ConstraintSystem<F>,
Implementors
impl<F> Sub<F, UInt8> for UInt8 where
F: PrimeField, [src]
F: PrimeField,
type ErrorType = UnsignedIntegerError
pub fn sub<CS>(
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt8
) -> Result<UInt8, <UInt8 as Sub<F, UInt8>>::ErrorType> where
CS: ConstraintSystem<F>,
Used for division. Evaluates a - b, and when a - b < 0, returns 0.
impl<F> Sub<F, UInt16> for UInt16 where
F: PrimeField, [src]
F: PrimeField,
type ErrorType = UnsignedIntegerError
pub fn sub<CS>(
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt16
) -> Result<UInt16, <UInt16 as Sub<F, UInt16>>::ErrorType> where
CS: ConstraintSystem<F>,
Used for division. Evaluates a - b, and when a - b < 0, returns 0.
impl<F> Sub<F, UInt32> for UInt32 where
F: PrimeField, [src]
F: PrimeField,
type ErrorType = UnsignedIntegerError
pub fn sub<CS>(
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt32
) -> Result<UInt32, <UInt32 as Sub<F, UInt32>>::ErrorType> where
CS: ConstraintSystem<F>,
Used for division. Evaluates a - b, and when a - b < 0, returns 0.
impl<F> Sub<F, UInt64> for UInt64 where
F: PrimeField, [src]
F: PrimeField,
type ErrorType = UnsignedIntegerError
pub fn sub<CS>(
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt64
) -> Result<UInt64, <UInt64 as Sub<F, UInt64>>::ErrorType> where
CS: ConstraintSystem<F>,
Used for division. Evaluates a - b, and when a - b < 0, returns 0.
impl<F> Sub<F, UInt128> for UInt128 where
F: PrimeField, [src]
F: PrimeField,
type ErrorType = UnsignedIntegerError
pub fn sub<CS>(
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>,
pub fn sub_unsafe<CS>(
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS,
other: &UInt128
) -> Result<UInt128, <UInt128 as Sub<F, UInt128>>::ErrorType> where
CS: ConstraintSystem<F>,
Used for division. Evaluates a - b, and when a - b < 0, returns 0.