Struct binary_heap_plus::FnComparator
source · [−]pub struct FnComparator<F>(pub F);
Expand description
The comparator defined by closure
Tuple Fields
0: F
Trait Implementations
sourceimpl<F: Clone> Clone for FnComparator<F>
impl<F: Clone> Clone for FnComparator<F>
sourcefn clone(&self) -> FnComparator<F>
fn clone(&self) -> FnComparator<F>
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, F> Compare<T, T> for FnComparator<F>where
F: Fn(&T, &T) -> Ordering,
impl<T, F> Compare<T, T> for FnComparator<F>where
F: Fn(&T, &T) -> Ordering,
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<F: Debug> Debug for FnComparator<F>
impl<F: Debug> Debug for FnComparator<F>
sourceimpl<F: Default> Default for FnComparator<F>
impl<F: Default> Default for FnComparator<F>
sourcefn default() -> FnComparator<F>
fn default() -> FnComparator<F>
Returns the “default value” for a type. Read more
sourceimpl<F: PartialEq> PartialEq<FnComparator<F>> for FnComparator<F>
impl<F: PartialEq> PartialEq<FnComparator<F>> for FnComparator<F>
sourcefn eq(&self, other: &FnComparator<F>) -> bool
fn eq(&self, other: &FnComparator<F>) -> bool
impl<F: Copy> Copy for FnComparator<F>
impl<F: Eq> Eq for FnComparator<F>
impl<F> StructuralEq for FnComparator<F>
impl<F> StructuralPartialEq for FnComparator<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for FnComparator<F>where
F: RefUnwindSafe,
impl<F> Send for FnComparator<F>where
F: Send,
impl<F> Sync for FnComparator<F>where
F: Sync,
impl<F> Unpin for FnComparator<F>where
F: Unpin,
impl<F> UnwindSafe for FnComparator<F>where
F: UnwindSafe,
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