Struct mut_binary_heap::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§
source§impl Clone for MaxComparator
impl Clone for MaxComparator
source§fn clone(&self) -> MaxComparator
fn clone(&self) -> MaxComparator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Ord> Compare<T, T> for MaxComparator
impl<T: Ord> Compare<T, T> for MaxComparator
source§fn 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.source§fn borrowing(self) -> Borrowing<Self, L, R>where
Self: Sized,
fn borrowing(self) -> Borrowing<Self, L, R>where Self: Sized,
Borrows the comparator’s parameters before comparing them. Read more
source§fn rev(self) -> Rev<Self>where
Self: Sized,
fn rev(self) -> Rev<Self>where Self: Sized,
Reverses the ordering of the comparator. Read more
source§impl Debug for MaxComparator
impl Debug for MaxComparator
source§impl Default for MaxComparator
impl Default for MaxComparator
source§fn default() -> MaxComparator
fn default() -> MaxComparator
Returns the “default value” for a type. Read more
source§impl PartialEq<MaxComparator> for MaxComparator
impl PartialEq<MaxComparator> for MaxComparator
source§fn eq(&self, other: &MaxComparator) -> bool
fn eq(&self, other: &MaxComparator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.