pub struct SearchResult {
pub hits: Vec<Value>,
pub facet_counts: BTreeMap<String, BTreeMap<String, u64>>,
pub total: u64,
pub took_ms: u64,
}Expand description
What the server hands back. Wire format uses camelCase
(facetCounts, tookMs) to match the typed-client SDKs and
ctx.db.search TS surface — Rust callers still see snake_case
field names because the rename is only on the serde layer.
Fields§
§hits: Vec<Value>Hit rows in ranked (or sorted) order. Each is a plain JSON row.
facet_counts: BTreeMap<String, BTreeMap<String, u64>>{facet_name: {value: count}}. Values sorted by count desc in
the server’s serialization.
total: u64Total hit count (before pagination).
took_ms: u64Milliseconds spent in the query engine, for client-side perf instrumentation and snappy-feeling dashboards.
Trait Implementations§
Source§impl Clone for SearchResult
impl Clone for SearchResult
Source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchResult
impl Debug for SearchResult
Source§impl<'de> Deserialize<'de> for SearchResult
impl<'de> Deserialize<'de> for SearchResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnsafeUnpin for SearchResult
impl UnwindSafe for SearchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more