pub struct SearchItem {
pub id: String,
pub kind: String,
pub title: String,
pub path: String,
pub subtitle: String,
pub use_count: u32,
pub last_accessed_epoch_secs: i64,
/* private fields */
}Fields§
§id: String§kind: String§title: String§path: String§subtitle: String§use_count: u32§last_accessed_epoch_secs: i64Implementations§
Source§impl SearchItem
impl SearchItem
pub fn new(id: &str, kind: &str, title: &str, path: &str) -> Self
pub fn from_owned( id: String, kind: String, title: String, path: String, use_count: u32, last_accessed_epoch_secs: i64, ) -> Self
pub fn from_owned_with_subtitle( id: String, kind: String, title: String, path: String, subtitle: String, use_count: u32, last_accessed_epoch_secs: i64, ) -> Self
pub fn with_usage(self, use_count: u32, last_accessed_epoch_secs: i64) -> Self
pub fn with_subtitle(self, subtitle: &str) -> Self
pub fn normalized_title(&self) -> &str
pub fn normalized_search_text(&self) -> &str
Trait Implementations§
Source§impl Clone for SearchItem
impl Clone for SearchItem
Source§fn clone(&self) -> SearchItem
fn clone(&self) -> SearchItem
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 SearchItem
impl Debug for SearchItem
Source§impl From<SearchItem> for SearchResultDto
impl From<SearchItem> for SearchResultDto
Source§fn from(value: SearchItem) -> Self
fn from(value: SearchItem) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SearchItem
impl PartialEq for SearchItem
Source§fn eq(&self, other: &SearchItem) -> bool
fn eq(&self, other: &SearchItem) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SearchItem
impl StructuralPartialEq for SearchItem
Auto Trait Implementations§
impl Freeze for SearchItem
impl RefUnwindSafe for SearchItem
impl Send for SearchItem
impl Sync for SearchItem
impl Unpin for SearchItem
impl UnsafeUnpin for SearchItem
impl UnwindSafe for SearchItem
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.