Crate classific

Source

Structs§

AtGreatest
See at_greatest.
AtLeast
See at_least.
BothEq
See EqClass::and.
CompareThen
See Comparator::then.
Comparing
See comparing.
ComparingRef
See comparing_ref.
ComparingRefWith
See comparing_ref_with.
ComparingWith
See comparing_with.
EqBy
See eq_by.
EqByCmp
See eq_by_cmp.
EqByHash
See eq_by_hash.
EqByRef
See eq_by_ref.
EqByRefWith
See eq_by_ref_with.
EqByWith
See eq_by_with.
NaturalEq
See natural_eq.
NaturalOrder
See natural_order.
PartialEqClass
See partial_eq.
PartialOrderOr
See partial_order_or.
ReversedNaturalOrder
See reverse_order.
ReversedOrder
See Comparator::reversed.

Traits§

Comparator
Implementations define a linear ordering over the type T, which can be semantically different from Ord::cmp.
EqClass
Implementations define an equivalence class over the type T, which can be semantically different from PartialEq::eq.

Functions§

at_greatest
This function returns a Comparator for T which divides T instances into 2 categories.
at_least
This function returns a Comparator for T which divides T instances into 2 categories.
comparing
This function returns a Comparator for S which first maps values to T then compare them with Ord::cmp.
comparing_ref
This function returns a Comparator for S which first maps values to &T then compare them with Ord::cmp.
comparing_ref_with
This function returns a Comparator for S which first maps values to &T then compare them with cmp.
comparing_with
This function returns a Comparator for S which first maps values to T then compare them with cmp.
eq_by
This function returns an EqClass for S which first maps values to T then compare them with PartialEq::eq.
eq_by_cmp
This function returns an EqClass for T which considers instances equal if and only the embedded Comparator returns Ordering::Equal for them.
eq_by_hash
This function returns an EqClass for T which considers instances equal if and only if their hash is equal.
eq_by_ref
This function returns an EqClass for S which first maps values to &T then compare them with PartialEq::eq.
eq_by_ref_with
This function returns an EqClass for S which first maps values to &T then compare them with PartialEq::eq.
eq_by_with
This function returns an EqClass for S which first maps values to T then compare them with PartialEq::eq.
move_to_cmp_fn
This function moves a Comparator into a Fn(&T, &T) -> Ordering to make it usable for APIs which doesn’t know about Comparators.
move_to_eq_fn
This function moves an EqClass into a Fn(&T, &T) -> bool to make it usable for APIs which doesn’t know about EqClasses.
natural_eq
This function returns an EqClass for T which follows the semantics of PartialEq::eq.
natural_order
This function returns a Comparator for T which follows the semantics of Ord::cmp.
partial_eq
This function returns an EqClass for T which considers every instance to be equal to every other instace where the instances do not equal to themselves by PartialEq::eq; otherwise PartialEq::eq is followed.
partial_order_or
This function returns a Comparator for T which follows the semantics of PartialOrd::partial_cmp but when that returns None it calls the underlying Comparator cmp.
reverse_order
This function returns a Comparator for T which follows the reverse semantics of Ord::cmp.