pub trait Select: Sized {
fn zero() -> Self;
fn checked_add(&self, rhs: &Self) -> Option<Self>;
fn checked_sub(&self, rhs: &Self) -> Option<Self>;
fn saturating_sub(&self, rhs: &Self) -> Self;
fn compare(&self, other: &Self, output: &Self) -> Ordering;
}
Expand description
The Select trait offers an interface of UTxO selection.
Required Methods
fn checked_add(&self, rhs: &Self) -> Option<Self>
fn checked_add(&self, rhs: &Self) -> Option<Self>
Computes self + rhs
, returning None
if overflow occurred.
fn checked_sub(&self, rhs: &Self) -> Option<Self>
fn checked_sub(&self, rhs: &Self) -> Option<Self>
Computes self - rhs
, returning None
if overflow occurred.
fn saturating_sub(&self, rhs: &Self) -> Self
fn saturating_sub(&self, rhs: &Self) -> Self
Computes self - rhs
, saturating at the lowest bound if overflow occurred.