Trait snarkvm_console_types_address::traits::Compare
source · pub trait Compare<Rhs = Self>where
Rhs: ?Sized,{
type Output;
// Required methods
fn is_less_than(&self, other: &Rhs) -> Self::Output;
fn is_greater_than(&self, other: &Rhs) -> Self::Output;
fn is_less_than_or_equal(&self, other: &Rhs) -> Self::Output;
fn is_greater_than_or_equal(&self, other: &Rhs) -> Self::Output;
}
Expand description
Trait for comparator operations.
Required Associated Types§
Required Methods§
sourcefn is_less_than(&self, other: &Rhs) -> Self::Output
fn is_less_than(&self, other: &Rhs) -> Self::Output
Returns true
if self
is less than other
.
sourcefn is_greater_than(&self, other: &Rhs) -> Self::Output
fn is_greater_than(&self, other: &Rhs) -> Self::Output
Returns true
if self
is greater than other
.
sourcefn is_less_than_or_equal(&self, other: &Rhs) -> Self::Output
fn is_less_than_or_equal(&self, other: &Rhs) -> Self::Output
Returns true
if self
is less than or equal to other
.
sourcefn is_greater_than_or_equal(&self, other: &Rhs) -> Self::Output
fn is_greater_than_or_equal(&self, other: &Rhs) -> Self::Output
Returns true
if self
is greater than or equal to other
.
Implementations on Foreign Types§
§impl<E> Compare<Scalar<E>> for Scalar<E>where
E: Environment,
impl<E> Compare<Scalar<E>> for Scalar<E>where E: Environment,
§fn is_less_than(
&self,
other: &Scalar<E>
) -> <Scalar<E> as Compare<Scalar<E>>>::Output
fn is_less_than( &self, other: &Scalar<E> ) -> <Scalar<E> as Compare<Scalar<E>>>::Output
Returns true
if self
is less than other
.
§fn is_greater_than(
&self,
other: &Scalar<E>
) -> <Scalar<E> as Compare<Scalar<E>>>::Output
fn is_greater_than( &self, other: &Scalar<E> ) -> <Scalar<E> as Compare<Scalar<E>>>::Output
Returns true
if self
is greater than other
.
§fn is_less_than_or_equal(
&self,
other: &Scalar<E>
) -> <Scalar<E> as Compare<Scalar<E>>>::Output
fn is_less_than_or_equal( &self, other: &Scalar<E> ) -> <Scalar<E> as Compare<Scalar<E>>>::Output
Returns true
if self
is less than or equal to other
.
§fn is_greater_than_or_equal(
&self,
other: &Scalar<E>
) -> <Scalar<E> as Compare<Scalar<E>>>::Output
fn is_greater_than_or_equal( &self, other: &Scalar<E> ) -> <Scalar<E> as Compare<Scalar<E>>>::Output
Returns true
if self
is greater than or equal to other
.