pub struct HighlightOptions {
pub start_tag: String,
pub end_tag: String,
pub max_fragments: usize,
pub fragment_size: usize,
}Expand description
Per-call configuration. Defaults use <b> / </b> tags, a full-text
highlight with no fragment cap, and
150-char fragments when max_fragments > 0.
Fields§
§start_tag: String§end_tag: String§max_fragments: usize0 keeps the whole text and just wraps matches; > 0
extracts that many fragments centred on the densest match
clusters.
fragment_size: usizeTrait 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 (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 HighlightOptions
impl Debug 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 UnsafeUnpin 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