Trait snarkvm_wasm::Integer [−][src]
pub trait Integer: Debug + Clone { type IntegerType; type UnsignedGadget; type UnsignedIntegerType; const SIZE: usize; fn constant(value: Self::IntegerType) -> Self; fn one() -> Self; fn zero() -> Self; fn new(bits: Vec<Boolean, Global>, value: Option<Self::IntegerType>) -> Self; fn is_constant(&self) -> bool; fn to_bits_le(&self) -> Vec<Boolean, Global>; fn from_bits_le(bits: &[Boolean]) -> Self; fn get_value(&self) -> Option<String>; fn result_is_constant(first: &Self, second: &Self) -> bool { ... } }
Expand description
The interface for a singed or unsigned integer gadget.
Associated Types
Associated Constants
Required methods
fn constant(value: Self::IntegerType) -> Selffn is_constant(&self) -> bool
fn is_constant(&self) -> boolReturns true if all bits in this Int are constant
fn to_bits_le(&self) -> Vec<Boolean, Global>fn from_bits_le(bits: &[Boolean]) -> SelfProvided methods
fn result_is_constant(first: &Self, second: &Self) -> bool
fn result_is_constant(first: &Self, second: &Self) -> boolReturns true if both Int objects have constant bits