Skip to content

feat(core): expose apply_search_filters as a public API - #568

Merged
githubrobbi merged 1 commit into
mainfrom
feat/expose-apply-search-filters
Jul 20, 2026
Merged

feat(core): expose apply_search_filters as a public API#568
githubrobbi merged 1 commit into
mainfrom
feat/expose-apply-search-filters

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

Summary

Flips `apply_search_filters` from `pub(crate)` to `pub` (plus an explicit
`pub use` re-export, since its containing module is otherwise re-exported at
`pub(crate)`). Visibility change only — no new data or logic. `SearchFilters`
and `DisplayRow` are already fully public types with their whole field list
visible in source today; what's new is the ability to call the existing
~20-axis filter-matching engine from outside `uffs-core` at all.

Motivating use case

A private downstream crate (`uffs-index-private`, planned in the
`uffs-products` repo — see `PRIVATE_RICH_INDEX_DESIGN.md` there) wants to
carry more fields per record than the public `CompactRecord` does
(ChangeTime, USN, security_id, owner_id — all already parsed by `uffs-mft`'s
`StandardInfo` today, just unused downstream), without growing the public
struct's per-record cost for every UFFS user.

It builds its own richer record type, adapts the overlapping fields into a
`DisplayRow` via `DisplayRow::new` (already a public constructor taking only
plain data), and can now run the whole existing filter engine against it
unchanged instead of forking or reimplementing it — then applies its own
small extra-fields filter pass on top for whatever `DisplayRow` doesn't
carry.

Test plan

  • `cargo doc` confirms the item is genuinely externally reachable at
    `uffs_core::search::filters::apply_search_filters` (not just visible
    in source)
  • `cargo fmt --check` / `just lint-prod` / `just lint-tests` clean
  • `cargo test -p uffs-core --lib` — 885 passed, 0 failed

Flips apply_search_filters from pub(crate) to pub, plus an explicit
pub use re-export (the containing apply module stays private via a
pub(crate) glob for everything else in it — row_passes_filters,
apply_derived_filters — which are staying internal helpers).

This is a visibility change only, exposing a function, not new data:
SearchFilters and DisplayRow are already fully public types with their
whole field list visible in source today. What's new is the ability
to call the existing ~20-axis filter-matching engine from outside
uffs-core at all.

Motivating use case: a private downstream crate (uffs-index-private,
in the uffs-products repo — see PRIVATE_RICH_INDEX_DESIGN.md there)
wants to carry more fields per record than the public CompactRecord
does (ChangeTime, USN, security_id, owner_id — all already parsed by
uffs-mft's StandardInfo today, just unused downstream), without
growing the public struct's per-record cost for every UFFS user. It
builds its own richer record type, adapts the overlapping fields into
a DisplayRow via DisplayRow::new (already a public constructor taking
only plain data), and now can run the whole existing filter engine
against it unchanged instead of forking or reimplementing it — then
applies its own small extra-fields filter pass on top for whatever
DisplayRow doesn't carry.

Verified: cargo doc confirms the item is genuinely externally
reachable at uffs_core::search::filters::apply_search_filters (not
just visible in source); fmt/lint-prod/lint-tests/tests all clean.
@githubrobbi
githubrobbi enabled auto-merge July 20, 2026 06:16
@githubrobbi
githubrobbi added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit ef8e13e Jul 20, 2026
21 checks passed
@githubrobbi
githubrobbi deleted the feat/expose-apply-search-filters branch July 20, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant