pub struct SearchContext {
pub url: String,
pub title: String,
pub selection: Option<String>,
pub extract: Option<String>,
}Expand description
Page context sent alongside a search query.
url and title are always present. selection is the user’s highlighted
text (if any). extract is a bounded text excerpt from the page body
(target: < 4 KiB; browser-side extraction is responsible for truncation).
Fields§
§url: String§title: String§selection: Option<String>§extract: Option<String>Trait Implementations§
Source§impl Clone for SearchContext
impl Clone for SearchContext
Source§fn clone(&self) -> SearchContext
fn clone(&self) -> SearchContext
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 SearchContext
impl Debug for SearchContext
Source§impl<'de> Deserialize<'de> for SearchContext
impl<'de> Deserialize<'de> for SearchContext
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 SearchContext
impl PartialEq for SearchContext
Source§impl Serialize for SearchContext
impl Serialize for SearchContext
impl StructuralPartialEq for SearchContext
Auto Trait Implementations§
impl Freeze for SearchContext
impl RefUnwindSafe for SearchContext
impl Send for SearchContext
impl Sync for SearchContext
impl Unpin for SearchContext
impl UnsafeUnpin for SearchContext
impl UnwindSafe for SearchContext
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