pub struct SearchResponse {
pub matches: Vec<SearchResult>,
pub total_estimate: Option<u64>,
pub next_cursor: Option<String>,
}Expand description
Response from GET /contexts/search.
Per acdp-search-response.schema.json (additionalProperties: false), the
wrapping array MUST be named matches. Conformant consumers MUST reject
responses that emit results or any other alternative spelling
(RFC-ACDP-0005 §2.2, fixture vis-003).
Fields§
§matches: Vec<SearchResult>Lightweight projections of matching contexts.
total_estimate: Option<u64>Estimated total — may be approximate. Omitted (never serialized
as null) when the registry supplies no estimate.
next_cursor: Option<String>Opaque pagination cursor; absent when there are no more results.
acdp-search-response.schema.json types next_cursor as a bare
string (not ["string","null"]): a missing cursor MUST be
expressed by omitting the key, never by serializing null. The
field is omitted on serialize and an explicit null is rejected
on deserialize (RFC-ACDP-0005 §2.2.1, fixture schema-005).
Implementations§
Source§impl SearchResponse
impl SearchResponse
Sourcepub fn results(&self) -> &[SearchResult]
pub fn results(&self) -> &[SearchResult]
Back-compat accessor; new code should prefer .matches.