Trait SignedAmountInterface

Source
pub trait SignedAmountInterface
where Self: Sized,
{ type W: WitnessGenerator<Fp>; type Bool: BoolInterface; type Amount: AmountInterface; // Required methods fn zero() -> Self; fn is_neg(&self) -> Self::Bool; fn equal(&self, other: &Self, w: &mut Self::W) -> Self::Bool; fn is_non_neg(&self) -> Self::Bool; fn negate(&self) -> Self; fn add_flagged(&self, other: &Self, w: &mut Self::W) -> (Self, Self::Bool); fn of_unsigned(unsigned: Self::Amount) -> Self; fn on_if( b: Self::Bool, param: SignedAmountBranchParam<&Self>, w: &mut Self::W, ) -> Self; }

Required Associated Types§

Required Methods§

Source

fn zero() -> Self

Source

fn is_neg(&self) -> Self::Bool

Source

fn equal(&self, other: &Self, w: &mut Self::W) -> Self::Bool

Source

fn is_non_neg(&self) -> Self::Bool

Source

fn negate(&self) -> Self

Source

fn add_flagged(&self, other: &Self, w: &mut Self::W) -> (Self, Self::Bool)

Source

fn of_unsigned(unsigned: Self::Amount) -> Self

Source

fn on_if( b: Self::Bool, param: SignedAmountBranchParam<&Self>, w: &mut Self::W, ) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SignedAmountInterface for CheckedSigned<Fp, CheckedAmount<Fp>>

Source§

type W = Witness<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

type Bool = CircuitVar<Boolean>

Source§

type Amount = CheckedAmount<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

impl SignedAmountInterface for Signed<Amount>