pub async fn default<K>(api: &Api<K>) -> Result<ObjectList<K>, Error>Expand description
List every kube Resource through its namespaced or cluster-scoped
Api with the default (no-selector) ListParams posture.
Owns the 2-link wire-side chain
api.list(&ListParams::default()) at ONE substrate owner across
every workspace consumer. Sibling to crate::create::default,
crate::patch::merge, and crate::delete::default on the
wire-verb axis (GET-list vs POST / PATCH / DELETE).
A future normalization of the list posture (an injectable
limit slot for bounded-page walks on large clusters, a
timeout slot for reconciler-budget-aware enumeration, a
resource_version continuation for watch-adjacent snapshots, a
server-side list_type selector) lands at THIS ONE function and
every downstream consumer inherits the upgrade mechanically — no
per-site edit at any of the four listed callers or at future
consumers (a future cross-namespace routing walker, a future
receipt-GC controller, a future pool-tombstone reaper).
The returned ObjectList<K> matches Api::list verbatim —
carries both the .items slot every current consumer reads and
the .metadata.resource_version / .metadata.continue_ slots a
future paginated / watch-continuing consumer needs without a
per-site widening.
Theory anchor: THEORY.md §VI.1 (generation over composition — the
2-link api.list(&ListParams::default()) chain recurred at 4
hand-authored sites past the ★★ PRIME-DIRECTIVE ≥ 2 duplication
trigger and is lifted onto the ONE workspace-wide substrate owner
here). THEORY.md §II.1 invariant 5 (composition preserves proofs
— the pin block below binds the primitive at fail-before-pass-
after granularity, so a regression that drifts ListParams:: default() to a non-default posture — a stray label_selector, an
accidental field_selector, a limit page-cap that silently
truncates the returned list, a timeout that races reconciler
budgets — surfaces at list::tests::* rather than as silent
operator-facing skew across the four consumer sites (a claim-
arbiter that only sees processes in one label group, a SIGTERM
cascade that skips direct children with unusual field shapes, a
pool controller that pages past its own members, an allocation
controller whose pool lookup silently truncates).