Struct mut_binary_heap::MinComparator
source · pub struct MinComparator;
Expand description
For T
that implements Ord
, you can use this struct to quickly
set up a min heap.
Trait Implementations§
source§impl Clone for MinComparator
impl Clone for MinComparator
source§fn clone(&self) -> MinComparator
fn clone(&self) -> MinComparator
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 MinComparator
impl<T: Ord> Compare<T, T> for MinComparator
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 MinComparator
impl Debug for MinComparator
source§impl Default for MinComparator
impl Default for MinComparator
source§fn default() -> MinComparator
fn default() -> MinComparator
Returns the “default value” for a type. Read more
source§impl PartialEq<MinComparator> for MinComparator
impl PartialEq<MinComparator> for MinComparator
source§fn eq(&self, other: &MinComparator) -> bool
fn eq(&self, other: &MinComparator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.