//! Ordering choices for scan queries.
/// Ordering applied when a scan query is materialized.
///
/// Sorting is intentionally separate from filtering. A query remains
/// allocation-free while filtering and iterating in source order; calling
/// [`ScanQuery::sort`](crate::ScanQuery::sort) materializes only borrowed
/// `(source, finding)` pairs.
///
/// Because source ordering is part of this unified enum, sorting requires the
/// source key type to implement [`Ord`], even when another sort variant is
/// selected. Equal primary keys use deterministic secondary ordering.