Struct binary_heap_plus::MaxComparator
source · [−]pub struct MaxComparator;
Expand description
For T
that implements Ord
, you can use this struct to quickly
set up a max heap.
Trait Implementations
sourceimpl Clone for MaxComparator
impl Clone for MaxComparator
sourcefn clone(&self) -> MaxComparator
fn clone(&self) -> MaxComparator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Ord> Compare<T, T> for MaxComparator
impl<T: Ord> Compare<T, T> for MaxComparator
sourcefn compare(&self, a: &T, b: &T) -> Ordering
fn compare(&self, a: &T, b: &T) -> Ordering
Compares two values, returning
Less
, Equal
, or Greater
if l
is less
than, equal to, or greater than r
, respectively. Read moresourcefn compares_lt(&self, l: &L, r: &R) -> bool
fn compares_lt(&self, l: &L, r: &R) -> bool
Checks if
l
is less than r
.sourcefn compares_le(&self, l: &L, r: &R) -> bool
fn compares_le(&self, l: &L, r: &R) -> bool
Checks if
l
is less than or equal to r
.sourcefn compares_ge(&self, l: &L, r: &R) -> bool
fn compares_ge(&self, l: &L, r: &R) -> bool
Checks if
l
is greater than or equal to r
.sourcefn compares_gt(&self, l: &L, r: &R) -> bool
fn compares_gt(&self, l: &L, r: &R) -> bool
Checks if
l
is greater than r
.sourcefn compares_eq(&self, l: &L, r: &R) -> bool
fn compares_eq(&self, l: &L, r: &R) -> bool
Checks if
l
is equal to r
.sourcefn compares_ne(&self, l: &L, r: &R) -> bool
fn compares_ne(&self, l: &L, r: &R) -> bool
Checks if
l
is not equal to r
.sourcefn borrowing(self) -> Borrowing<Self, L, R>
fn borrowing(self) -> Borrowing<Self, L, R>
Borrows the comparator’s parameters before comparing them. Read more
sourceimpl Debug for MaxComparator
impl Debug for MaxComparator
sourceimpl Default for MaxComparator
impl Default for MaxComparator
sourcefn default() -> MaxComparator
fn default() -> MaxComparator
Returns the “default value” for a type. Read more
sourceimpl PartialEq<MaxComparator> for MaxComparator
impl PartialEq<MaxComparator> for MaxComparator
sourcefn eq(&self, other: &MaxComparator) -> bool
fn eq(&self, other: &MaxComparator) -> bool
impl Copy for MaxComparator
impl Eq for MaxComparator
impl StructuralEq for MaxComparator
impl StructuralPartialEq for MaxComparator
Auto Trait Implementations
impl RefUnwindSafe for MaxComparator
impl Send for MaxComparator
impl Sync for MaxComparator
impl Unpin for MaxComparator
impl UnwindSafe for MaxComparator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more