pub enum ExecData {
Hits(Vec<SearchHit>),
Groups(Vec<GroupedSearchResult>),
Count(u64),
Facet(Vec<FacetHit>),
Mutation {
affected: Option<u64>,
},
Collections(Vec<String>),
Collection(CollectionInfo),
ShardKeys(Vec<PlanShardKey>),
Quotas(QuotaConfig),
}Expand description
Transport-neutral typed payload of one operation result. Closed by construction: every backend response shape the transports can produce has a variant here — there is no JSON passthrough.
Serialization emits the report JSON shapes SDK consumers already read:
Hits → array of SearchHit, Groups → {"groups": [{"id", "hits"}]},
Count → {"count": n}, Facet → array of {"value": …, "count": n},
Mutation { affected: Some(n) } → {"count": n},
Mutation { affected: None } → null,
Collections → {"collections": ["name", …]},
Collection → the CollectionInfo object,
ShardKeys → {"shard_keys": [key, …]},
Quotas → the QuotaConfig object.
Variants§
Hits(Vec<SearchHit>)
Query / scroll / retrieve hits, in backend order.
Groups(Vec<GroupedSearchResult>)
Grouped query results (QUERY … GROUP BY).
Count(u64)
COUNT result.
Facet(Vec<FacetHit>)
FACET entries.
Mutation
Write-op outcome: affected: Some(n) for upsert (n points written),
None for status-only mutations (delete, payload/vector updates).
Collections(Vec<String>)
Collection names (SHOW COLLECTIONS).
Collection(CollectionInfo)
Collection metadata (SHOW COLLECTION).
ShardKeys(Vec<PlanShardKey>)
Custom shard keys (SHOW SHARD KEYS).
Quotas(QuotaConfig)
Cluster-wide quota configuration (SHOW QUOTAS / SET QUOTA).
Implementations§
Source§impl ExecData
impl ExecData
Sourcepub fn hits(&self) -> Option<&[SearchHit]>
pub fn hits(&self) -> Option<&[SearchHit]>
Borrow hits when this is a ExecData::Hits payload. A query that
found nothing still yields Some(&[]), matching the pre-typing
hits() contract.
Sourcepub fn groups(&self) -> Option<&[GroupedSearchResult]>
pub fn groups(&self) -> Option<&[GroupedSearchResult]>
Borrow grouped results when this is an ExecData::Groups payload.
Sourcepub fn count(&self) -> Option<u64>
pub fn count(&self) -> Option<u64>
The integer when this is a ExecData::Count payload, or the affected
point count of an upsert ExecData::Mutation.
Sourcepub fn mutation_affected(&self) -> Option<Option<u64>>
pub fn mutation_affected(&self) -> Option<Option<u64>>
The affected-point count of an ExecData::Mutation: Some(Some(n))
for an upsert, Some(None) for a status-only write, None otherwise.
Sourcepub fn facet(&self) -> Option<&[FacetHit]>
pub fn facet(&self) -> Option<&[FacetHit]>
Borrow facet entries when this is a ExecData::Facet payload.
Sourcepub fn collections(&self) -> Option<&[String]>
pub fn collections(&self) -> Option<&[String]>
Borrow collection names when this is a ExecData::Collections payload.
Sourcepub fn collection(&self) -> Option<&CollectionInfo>
pub fn collection(&self) -> Option<&CollectionInfo>
Borrow collection metadata when this is an ExecData::Collection payload.
Sourcepub fn shard_keys(&self) -> Option<&[PlanShardKey]>
pub fn shard_keys(&self) -> Option<&[PlanShardKey]>
Borrow custom shard keys when this is an ExecData::ShardKeys payload.
Sourcepub fn quotas(&self) -> Option<&QuotaConfig>
pub fn quotas(&self) -> Option<&QuotaConfig>
Borrow the quota configuration when this is a ExecData::Quotas payload.