pub enum SearchQueryMatchData {
Bytes(Vec<u8>),
Text(String),
}
Variants§
Implementations§
source§impl SearchQueryMatchData
impl SearchQueryMatchData
sourcepub fn to_str(&self) -> Option<&str>
pub fn to_str(&self) -> Option<&str>
Returns the UTF-8 str reference to the data, if is valid UTF-8
sourcepub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_string_lossy(&self) -> Cow<'_, str>
Converts data to a UTF-8 string, replacing any invalid UTF-8 sequences with
U+FFFD REPLACEMENT CHARACTER
Trait Implementations§
source§impl Clone for SearchQueryMatchData
impl Clone for SearchQueryMatchData
source§fn clone(&self) -> SearchQueryMatchData
fn clone(&self) -> SearchQueryMatchData
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 SearchQueryMatchData
impl Debug for SearchQueryMatchData
source§impl<'de> Deserialize<'de> for SearchQueryMatchData
impl<'de> Deserialize<'de> for SearchQueryMatchData
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<'a> From<&'a [u8]> for SearchQueryMatchData
impl<'a> From<&'a [u8]> for SearchQueryMatchData
source§impl<'a> From<&'a str> for SearchQueryMatchData
impl<'a> From<&'a str> for SearchQueryMatchData
source§impl From<String> for SearchQueryMatchData
impl From<String> for SearchQueryMatchData
source§impl PartialEq<SearchQueryMatchData> for SearchQueryMatchData
impl PartialEq<SearchQueryMatchData> for SearchQueryMatchData
source§fn eq(&self, other: &SearchQueryMatchData) -> bool
fn eq(&self, other: &SearchQueryMatchData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SearchQueryMatchData
impl Serialize for SearchQueryMatchData
impl Eq for SearchQueryMatchData
impl StructuralEq for SearchQueryMatchData
impl StructuralPartialEq for SearchQueryMatchData
Auto Trait Implementations§
impl RefUnwindSafe for SearchQueryMatchData
impl Send for SearchQueryMatchData
impl Sync for SearchQueryMatchData
impl Unpin for SearchQueryMatchData
impl UnwindSafe for SearchQueryMatchData
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