pub enum WordBoundary {
WhitespaceOnly,
WhitespaceOrDelimiter,
}Expand description
Which bytes may neighbour a match for it to stand alone as a word.
The two rules come from real files and each changes which bytes a damaged document yields, so the choice is the caller’s and is named at every call site.
Variants§
WhitespaceOnly
Only whitespace. The stricter rule, used when scanning for
endstream: >>endstream does not count as a match.
WhitespaceOrDelimiter
Whitespace or a delimiter — anything that is neither
CharClass::Regular nor CharClass::Numeric. The looser rule,
used for startxref, where the keyword may sit against >> or ].
Trait Implementations§
Source§impl Clone for WordBoundary
impl Clone for WordBoundary
Source§fn clone(&self) -> WordBoundary
fn clone(&self) -> WordBoundary
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 moreimpl Copy for WordBoundary
Source§impl Debug for WordBoundary
impl Debug for WordBoundary
impl Eq for WordBoundary
Source§impl PartialEq for WordBoundary
impl PartialEq for WordBoundary
impl StructuralPartialEq for WordBoundary
Auto Trait Implementations§
impl Freeze for WordBoundary
impl RefUnwindSafe for WordBoundary
impl Send for WordBoundary
impl Sync for WordBoundary
impl Unpin for WordBoundary
impl UnsafeUnpin for WordBoundary
impl UnwindSafe for WordBoundary
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