Skip to main content

GroupOrder

Trait GroupOrder 

Source
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§

Source

fn compare( &self, a: &GroupOrderContext<'_>, b: &GroupOrderContext<'_>, ) -> Ordering

Compares two sibling groups.

Provided Methods§

Source

fn depends_on(&self) -> ColumnSet

The columns whose changes can reorder groups: the order’s aggregates. Empty for an order that reads keys alone.

Implementors§