pub trait SignedAmountInterfacewhere
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§
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
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.