pub enum UnifiedBoundaryScanner {
Sentence(Option<String>),
Word(Option<String>),
}
Expand description
Specifies how to break the highlighted fragments. Defaults to
sentence
.
Variants§
Sentence(Option<String>)
Break highlighted fragments at the next sentence boundary, as determined by Java’s
BreakIterator.
You can specify the locale to use with boundary_scanner_locale
.
Warning
Thesentence
scanner splits sentences bigger thanfragment_size
at the first word boundary next tofragment_size
. You can setfragment_size
to 0 to never split any sentence.
Word(Option<String>)
Break highlighted fragments at the next word boundary, as determined by Java’s
BreakIterator.
You can specify the locale to use with boundary_scanner_locale
.
Trait Implementations§
Source§impl Clone for UnifiedBoundaryScanner
impl Clone for UnifiedBoundaryScanner
Source§fn clone(&self) -> UnifiedBoundaryScanner
fn clone(&self) -> UnifiedBoundaryScanner
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 UnifiedBoundaryScanner
impl Debug for UnifiedBoundaryScanner
Source§impl Ord for UnifiedBoundaryScanner
impl Ord for UnifiedBoundaryScanner
Source§fn cmp(&self, other: &UnifiedBoundaryScanner) -> Ordering
fn cmp(&self, other: &UnifiedBoundaryScanner) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UnifiedBoundaryScanner
impl PartialEq for UnifiedBoundaryScanner
Source§impl PartialOrd for UnifiedBoundaryScanner
impl PartialOrd for UnifiedBoundaryScanner
Source§impl Serialize for UnifiedBoundaryScanner
impl Serialize for UnifiedBoundaryScanner
impl Eq for UnifiedBoundaryScanner
impl StructuralPartialEq for UnifiedBoundaryScanner
Auto Trait Implementations§
impl Freeze for UnifiedBoundaryScanner
impl RefUnwindSafe for UnifiedBoundaryScanner
impl Send for UnifiedBoundaryScanner
impl Sync for UnifiedBoundaryScanner
impl Unpin for UnifiedBoundaryScanner
impl UnwindSafe for UnifiedBoundaryScanner
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