pub struct WideSub<UX: UnsignedAddPrimitives, const BIT_LENGTH: usize> {
pub xin: [Col<B1>; BIT_LENGTH],
pub yin: [Col<B1>; BIT_LENGTH],
pub zout: [Col<B1>; BIT_LENGTH],
pub final_borrow: Option<Col<B1>>,
pub flags: U32SubFlags,
/* private fields */
}
Expand description
Gadget for unsigned subtraction using non-packed one-bit columns generic over u32
and u64
Fields§
§xin: [Col<B1>; BIT_LENGTH]
Inputs
yin: [Col<B1>; BIT_LENGTH]
§zout: [Col<B1>; BIT_LENGTH]
Outputs
final_borrow: Option<Col<B1>>
§flags: U32SubFlags
Implementations§
Source§impl<UX: UnsignedAddPrimitives, const BIT_LENGTH: usize> WideSub<UX, BIT_LENGTH>
impl<UX: UnsignedAddPrimitives, const BIT_LENGTH: usize> WideSub<UX, BIT_LENGTH>
pub fn new( table: &mut TableBuilder<'_>, xin: [Col<B1>; BIT_LENGTH], yin: [Col<B1>; BIT_LENGTH], flags: U32SubFlags, ) -> Self
pub fn populate<P>( &self, index: &mut TableWitnessSegment<'_, P>, ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl<UX, const BIT_LENGTH: usize> Freeze for WideSub<UX, BIT_LENGTH>
impl<UX, const BIT_LENGTH: usize> RefUnwindSafe for WideSub<UX, BIT_LENGTH>where
UX: RefUnwindSafe,
impl<UX, const BIT_LENGTH: usize> Send for WideSub<UX, BIT_LENGTH>where
UX: Send,
impl<UX, const BIT_LENGTH: usize> Sync for WideSub<UX, BIT_LENGTH>where
UX: Sync,
impl<UX, const BIT_LENGTH: usize> Unpin for WideSub<UX, BIT_LENGTH>where
UX: Unpin,
impl<UX, const BIT_LENGTH: usize> UnwindSafe for WideSub<UX, BIT_LENGTH>where
UX: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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