Search Result • Rust AI Agent SDK
SearchResult: Container for search results.
SearchResult
Defined in the knowledge module.
Rust AI Agent SDK
Container for search results.
Fields
| Name | Type | Description |
|---|---|---|
results | Vec<SearchResultItem> | List of result items |
metadata | HashMap<String | Search metadata |
query | String | Original query |
total_count | Option<usize> | Total count (may differ from results.len() if paginated) |
Methods
new
fn new(query: impl Into<String>, results: Vec<SearchResultItem>) -> SelfCreate a new search result
Parameters:
| Name | Type |
|---|---|
query | impl Into<String> |
results | Vec<SearchResultItem> |
is_empty
fn is_empty(&self) -> boolCheck if empty
len
fn len(&self) -> usizeGet result count
Source
View on GitHubpraisonai/src/knowledge/mod.rs at line 145