pub trait SpaceChildOrd {
// Provided method
fn cmp_space_child(&self, other: &impl SpaceChildOrd) -> Ordering { ... }
}
Available on crate feature
events
only.Expand description
Helper trait to sort m.space.child
events using using the algorithm for ordering children
within a space.
This trait can be used to sort a slice using .sort_by(SpaceChildOrd::cmp_space_child)
. It is
also possible to use SpaceChildOrdHelper
to sort the events in a BTreeMap
or a BTreeSet
.
Provided Methods§
Sourcefn cmp_space_child(&self, other: &impl SpaceChildOrd) -> Ordering
fn cmp_space_child(&self, other: &impl SpaceChildOrd) -> Ordering
Return an Ordering
between self
and other
, using the algorithm for ordering
children within a space.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.