[−][src]Struct snarkvm_models::gadgets::utilities::uint::unsigned_integer::UInt16
Fields
bits: Vec<Boolean>negated: boolvalue: Option<u16>Implementations
impl UInt16[src]
Trait Implementations
impl<F: Field + PrimeField> Add<F, UInt16> for UInt16[src]
type ErrorType = SynthesisError
pub fn add<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, Self::ErrorType>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, Self::ErrorType>
impl<F: Field> AllocGadget<u16, F> for UInt16[src]
pub fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<u16>, CS: ConstraintSystem<F>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>[src]
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
pub fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<u16>, CS: ConstraintSystem<F>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>[src]
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
pub fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>[src]
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
pub fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>[src]
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
impl Clone for UInt16[src]
impl<F: Field + PrimeField> ComparatorGadget<F> for UInt16[src]
pub fn greater_than<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>
pub fn less_than_or_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>
pub fn greater_than_or_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>
impl<F: PrimeField> CondSelectGadget<F> for UInt16[src]
pub fn conditionally_select<CS: ConstraintSystem<F>>(
cs: CS,
cond: &Boolean,
first: &Self,
second: &Self
) -> Result<Self, SynthesisError>[src]
cs: CS,
cond: &Boolean,
first: &Self,
second: &Self
) -> Result<Self, SynthesisError>
pub fn cost() -> usize[src]
impl<F: Field> ConditionalEqGadget<F> for UInt16[src]
pub fn conditional_enforce_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError>[src]
&self,
cs: CS,
other: &Self,
condition: &Boolean
) -> Result<(), SynthesisError>
pub fn cost() -> usize[src]
impl Debug for UInt16[src]
impl Eq for UInt16[src]
impl<F: Field> EqGadget<F> for UInt16[src]
pub fn enforce_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<(), SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<(), SynthesisError>
pub fn cost() -> usize[src]
impl<F: PrimeField> EvaluateEqGadget<F> for UInt16[src]
pub fn evaluate_equal<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>
impl<F: Field + PrimeField> EvaluateLtGadget<F> for UInt16[src]
pub fn less_than<CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Boolean, SynthesisError>
impl PartialEq<UInt16> for UInt16[src]
pub fn eq(&self, other: &Self) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<UInt16> for UInt16[src]
pub fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl<F: Field> ToBytesGadget<F> for UInt16[src]
pub fn to_bytes<CS: ConstraintSystem<F>>(
&self,
_cs: CS
) -> Result<Vec<UInt8>, SynthesisError>[src]
&self,
_cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
pub fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>[src]
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
impl UInt for UInt16[src]
pub fn negate(&self) -> Self[src]
pub fn is_constant(&self) -> bool[src]
pub fn to_bits_le(&self) -> Vec<Boolean>[src]
pub fn from_bits_le(bits: &[Boolean]) -> Self[src]
pub fn rotr(&self, by: usize) -> Self[src]
pub fn xor<F: Field, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
pub fn addmany<F: PrimeField, CS: ConstraintSystem<F>>(
cs: CS,
operands: &[Self]
) -> Result<Self, SynthesisError>[src]
cs: CS,
operands: &[Self]
) -> Result<Self, SynthesisError>
pub fn sub<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
pub fn sub_unsafe<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
Used for division. Evaluates a - b, and when a - b < 0, returns 0.
pub fn mul<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
pub fn div<F: PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
pub fn pow<F: Field + PrimeField, CS: ConstraintSystem<F>>(
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>[src]
&self,
cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
pub fn result_is_constant(first: &Self, second: &Self) -> bool[src]
Auto Trait Implementations
impl RefUnwindSafe for UInt16[src]
impl Send for UInt16[src]
impl Sync for UInt16[src]
impl Unpin for UInt16[src]
impl UnwindSafe for UInt16[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<F, T> ConditionalOrEqualsGadget<F> for T where
F: Field,
T: ConditionalEqGadget<F> + CondSelectGadget<F>, [src]
F: Field,
T: ConditionalEqGadget<F> + CondSelectGadget<F>,
pub fn conditional_enforce_equal_or<CS>(
CS,
&Boolean,
&T,
&T,
&T,
&Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS,
&Boolean,
&T,
&T,
&T,
&Boolean
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn cost() -> usize[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<F, T> OrEqualsGadget<F> for T where
F: Field,
T: ConditionalOrEqualsGadget<F>, [src]
F: Field,
T: ConditionalOrEqualsGadget<F>,
pub fn enforce_equal_or<CS>(
CS,
&Boolean,
&T,
&T,
&T
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS,
&Boolean,
&T,
&T,
&T
) -> Result<(), SynthesisError> where
CS: ConstraintSystem<F>,
pub fn cost() -> usize[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,