#[non_exhaustive]pub struct ViewSpec {
pub filters: Filters,
pub sort: SortKey,
pub limit: Option<usize>,
pub group_by: Option<GroupKey>,
}Expand description
Caller-supplied shape for the View pipeline.
Default::default() produces a no-op spec: no filtering, CRAP
descending, no row limit, no grouping. Construct with struct-update
syntax to stay forward-compatible with future fields:
let spec = ViewSpec {
filters: Filters { only_failing: true, ..Default::default() },
sort: SortKey::Coverage,
limit: Some(10),
..Default::default()
};#[non_exhaustive] reserves namespace for additive fields (e.g.,
future min_complexity, risk_floor, secondary sort) without
breaking downstream callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.filters: FiltersEligibility predicates — AND-composed. See Filters.
sort: SortKeyOrdering key. See SortKey.
limit: Option<usize>Maximum rows after sort. None and Some(0) mean “no limit”
(the --top 0 ergonomic). When group_by is set, limit
shifts to the file level — function-level rows are not truncated.
group_by: Option<GroupKey>When set, the View carries a parallel per-key aggregation
(AnalysisView::grouped). The function-level row list
(shown) is not truncated under grouping — limit shifts to
the file level and applies to grouped.files. Today only
Some(GroupKey::File) is supported; #[non_exhaustive]
reserves namespace for Risk / Module.