#[non_exhaustive]pub struct Page<T> {
pub count: u64,
pub next: Option<String>,
pub previous: Option<String>,
pub count_type: Option<String>,
pub meta: Option<Value>,
pub page_metadata: Option<Value>,
pub cursor: Option<String>,
pub results: Vec<T>,
}Expand description
A single page of results from a list endpoint.
next/previous are the server-supplied URLs to the adjacent pages;
cursor is the keyset cursor extracted from next for convenience (empty
on offset-paginated endpoints).
The struct is #[non_exhaustive]: the SDK builds pages, callers read them.
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.count: u64Total number of items across all pages, when the server reports it.
For some endpoints this matches results.len().
next: Option<String>URL of the next page, or None when on the last page.
previous: Option<String>URL of the previous page, or None when on the first page.
count_type: Option<String>"exact" or "approximate", from the response’s X-Results-CountType header; None when the endpoint does not send it.
Past 1,000 matches the contract, IDV, opportunity and notice lists may report a query-planner estimate as count, which can be well off; this says which one you got.
It is read from this page’s own response, so concurrent calls on one client never see each other’s value the way Client::last_response_headers can.
meta: Option<Value>The response’s meta object, passed through as the API sends it: agency-filter diagnostics (resolved_filters, agency_warnings, unresolved_agency_tokens, resolved_agencies), upgrade_hints and the like.
Each entry of meta["resolved_filters"][<filter name>] that resolved says how its token matched in matched_by (Tango API 5.9.0+): key (an organization UUID), code (a 3-digit CGAC or 4-digit FPDS code), name (the organization’s name, including a department’s everyday name, a spelling variant or a rename), alias (an abbreviation or the organization’s own alias) or fuzzy (a looser text match, worth checking against the resolved name).
An entry that did not resolve has no matched_by.
page_metadata: Option<Value>Opaque page metadata for keyset endpoints.
cursor: Option<String>Cursor extracted from next on cursor-paginated endpoints. Pass it
back via the cursor option to fetch the next page. Empty when the
endpoint is offset-paginated or no cursor is set.
results: Vec<T>The actual data for this page.