pub struct MSet(/* private fields */);
Expand description
A list of search results with associated metadata
Implementations§
Source§impl MSet
impl MSet
Sourcepub fn convert_to_percent(&self, weight: f64) -> i32
pub fn convert_to_percent(&self, weight: f64) -> i32
Convert a weight to a percentage, taking into account weighted query terms
Sourcepub fn snippet<T, U, V>(
&self,
text: impl AsRef<str>,
length: usize,
stemmer: impl AsRef<Stem>,
flags: u32,
hl: impl Into<Option<(T, U)>>,
omit: impl Into<Option<V>>,
) -> String
pub fn snippet<T, U, V>( &self, text: impl AsRef<str>, length: usize, stemmer: impl AsRef<Stem>, flags: u32, hl: impl Into<Option<(T, U)>>, omit: impl Into<Option<V>>, ) -> String
Generate a snippet from the provided text
length
controls the size of the snippet
stemmer
should be an instance of the same stemming algorithm used to build the query
flags
are used to control specific bits of functionality
hl
is an optional pair of string-likes used to highlight matches within the snippet, for use in markup
omit
is used to indicate any truncated prefix or suffix
mid-sen
Auto Trait Implementations§
impl Freeze for MSet
impl !RefUnwindSafe for MSet
impl !Send for MSet
impl !Sync for MSet
impl Unpin for MSet
impl UnwindSafe for MSet
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