pub struct HighlightOptions {
pub enabled: bool,
pub start_tag: String,
pub end_tag: String,
pub max_length: Option<u32>,
pub max_fragments: Option<u32>,
pub delimiter: String,
}Expand description
Highlighting options for search results.
Fields§
§enabled: boolWhether to include highlights.
start_tag: StringStart tag for highlights.
end_tag: StringEnd tag for highlights.
max_length: Option<u32>Maximum length of highlighted text.
max_fragments: Option<u32>Number of fragments to return.
delimiter: StringFragment delimiter.
Implementations§
Source§impl HighlightOptions
impl HighlightOptions
Set highlight tags.
Sourcepub fn max_length(self, length: u32) -> Self
pub fn max_length(self, length: u32) -> Self
Set maximum text length.
Sourcepub fn max_fragments(self, count: u32) -> Self
pub fn max_fragments(self, count: u32) -> Self
Set maximum number of fragments.
Trait Implementations§
Source§impl Clone for HighlightOptions
impl Clone for HighlightOptions
Source§fn clone(&self) -> HighlightOptions
fn clone(&self) -> HighlightOptions
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 HighlightOptions
impl Debug for HighlightOptions
Source§impl Default for HighlightOptions
impl Default for HighlightOptions
Source§impl<'de> Deserialize<'de> for HighlightOptions
impl<'de> Deserialize<'de> for HighlightOptions
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 HighlightOptions
impl PartialEq for HighlightOptions
Source§impl Serialize for HighlightOptions
impl Serialize for HighlightOptions
impl Eq for HighlightOptions
impl StructuralPartialEq for HighlightOptions
Auto Trait Implementations§
impl Freeze for HighlightOptions
impl RefUnwindSafe for HighlightOptions
impl Send for HighlightOptions
impl Sync for HighlightOptions
impl Unpin for HighlightOptions
impl UnwindSafe for HighlightOptions
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