pub struct SearchResult {
pub search_string: String,
pub url: Url,
pub title: String,
pub icon_url: Option<Url>,
pub frecency: i64,
}
Fields§
§search_string: String
The search string for this match.
url: Url
The URL to open when the user confirms a match. This is
equivalent to nsIAutoCompleteResult.getFinalCompleteValueAt
.
title: String
The title of the autocompleted value, to show in the UI. This can be the title of the bookmark or page, origin, URL, or URL fragment.
icon_url: Option<Url>
The favicon URL.
frecency: i64
A frecency score for this match.
Implementations§
source§impl SearchResult
impl SearchResult
sourcepub fn from_adaptive_row(row: &Row<'_>) -> Result<Self>
pub fn from_adaptive_row(row: &Row<'_>) -> Result<Self>
Default search behaviors from Desktop: HISTORY, BOOKMARK, OPENPAGE, SEARCHES. Default match behavior: MATCH_BOUNDARY_ANYWHERE.
pub fn from_suggestion_row(row: &Row<'_>) -> Result<Self>
pub fn from_origin_row(row: &Row<'_>) -> Result<Self>
pub fn from_url_row(row: &Row<'_>) -> Result<Self>
Trait Implementations§
source§impl Clone for SearchResult
impl Clone for SearchResult
source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
Returns a copy 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 From<SearchResult> for SearchResult
impl From<SearchResult> for SearchResult
source§fn from(res: SearchResult) -> Self
fn from(res: SearchResult) -> Self
Converts to this type from the input type.
source§impl PartialEq for SearchResult
impl PartialEq for SearchResult
source§impl Serialize for SearchResult
impl Serialize for SearchResult
impl Eq 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more