pub trait GroupOrder<R: GridRow>:
Send
+ Sync
+ 'static {
// Required method
fn compare(
&self,
a: &GroupOrderContext<'_>,
b: &GroupOrderContext<'_>,
) -> Ordering;
// Provided method
fn depends_on(&self) -> ColumnSet { ... }
}Expand description
The order of sibling groups. Groups are first in the order of their
keys, each level in its direction; compare sorts siblings stably from
there, so Equal keeps the key order.
Called in the background, from several threads of a large rebuild, once per comparison of two groups.
Required Methods§
Sourcefn compare(
&self,
a: &GroupOrderContext<'_>,
b: &GroupOrderContext<'_>,
) -> Ordering
fn compare( &self, a: &GroupOrderContext<'_>, b: &GroupOrderContext<'_>, ) -> Ordering
Compares two sibling groups.
Provided Methods§
Sourcefn depends_on(&self) -> ColumnSet
fn depends_on(&self) -> ColumnSet
The columns whose changes can reorder groups: the order’s aggregates. Empty for an order that reads keys alone.