pub struct Limb<E: Engine> {
pub term: Term<E>,
pub max_value: BigUint,
}
Fields§
§term: Term<E>
§max_value: BigUint
Implementations§
Source§impl<E: Engine> Limb<E>
impl<E: Engine> Limb<E>
pub fn new(term: Term<E>, max_value: BigUint) -> Self
pub fn constant_from_biguint(value: BigUint) -> Self
pub fn constant_from_field_value(value: E::Fr) -> Self
pub fn max_value(&self) -> BigUint
pub fn get_value_as_biguint(&self) -> Option<BigUint>
pub fn get_value(&self) -> Option<E::Fr>
pub fn zero() -> Self
pub fn one() -> Self
pub fn is_constant(&self) -> bool
pub fn get_max_bitlen(&self) -> usize
pub fn circuit_eq(&self, other: &Self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Limb<E>
impl<E> RefUnwindSafe for Limb<E>
impl<E> Send for Limb<E>
impl<E> Sync for Limb<E>
impl<E> Unpin for Limb<E>
impl<E> UnwindSafe for Limb<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more