pub struct FnComparator<F>(pub F);
Tuple Fields§
§0: F
Trait Implementations§
Source§impl<F: Clone> Clone for FnComparator<F>
impl<F: Clone> Clone for FnComparator<F>
Source§fn clone(&self) -> FnComparator<F>
fn clone(&self) -> FnComparator<F>
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, F> Compare<T> for FnComparator<F>
impl<T, F> Compare<T> for FnComparator<F>
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<F: Debug> Debug for FnComparator<F>
impl<F: Debug> Debug for FnComparator<F>
Source§impl<F: Default> Default for FnComparator<F>
impl<F: Default> Default for FnComparator<F>
Source§fn default() -> FnComparator<F>
fn default() -> FnComparator<F>
Returns the “default value” for a type. Read more
Source§impl<F: PartialEq> PartialEq for FnComparator<F>
impl<F: PartialEq> PartialEq for FnComparator<F>
impl<F: Copy> Copy for FnComparator<F>
impl<F: Eq> Eq for FnComparator<F>
impl<F> StructuralPartialEq for FnComparator<F>
Auto Trait Implementations§
impl<F> Freeze for FnComparator<F>where
F: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more