pub struct SearchResult {
pub title: String,
pub url: String,
pub snippet: String,
pub score: f64,
pub published_date: Option<String>,
pub author: Option<String>,
pub provider: &'static str,
}Expand description
One ranked web hit, independent of the hosting provider.
Fields§
§title: StringResult title.
url: StringCanonicalized result URL (fragment stripped).
snippet: StringProvider text snippet / page excerpt.
score: f64Relevance normalized into 0..=1; higher is better.
Providers that ship a native score (Tavily, Exa) keep it; position-based providers (Serper) get a rank-derived score. The tool re-ranks by this field, so callers never need provider-specific comparisons.
published_date: Option<String>Publisher-reported date, when the API returns one.
Publisher-reported author, when the API returns one.
provider: &'static strBackend label ("tavily", "serper", "exa", …).
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 (const: unstable) · 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 PartialEq for SearchResult
impl PartialEq for SearchResult
Source§impl Serialize for SearchResult
impl Serialize for SearchResult
impl StructuralPartialEq for SearchResult
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