pub struct SearchResult {
pub namespace: Namespace,
pub title: String,
pub pageid: usize,
pub language: Language,
pub endpoint: Endpoint,
pub size: Option<usize>,
pub wordcount: Option<usize>,
pub snippet: Option<String>,
pub timestamp: Option<String>,
}Expand description
A single search result containing additional optional properties if they were added in the search
Fields§
§namespace: NamespaceNamespace where the page belongs to
title: StringTitle of the page
pageid: usizePageId of the page
language: LanguageLanguage, the page is written in
endpoint: EndpointAPI endpoint of the MediaWiki site this page belongs to
size: Option<usize>Optional: Size in bytes of the page
wordcount: Option<usize>Optional: Word count of the page
snippet: Option<String>Optional: Snippet of the page, with query term highlighting markup
timestamp: Option<String>Optional: Timestamp of when the page was last edited
Implementations§
Source§impl SearchResult
impl SearchResult
pub fn cleaned_snippet(&self) -> String
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
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§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.