pub enum UnicodeMode {
Ascii,
Default,
Full,
Javascript,
}Expand description
Coverage of \w/\d/\s and the width of . / negated classes.
Variants§
Ascii
ASCII \w/\d/\s; . and negated classes step byte-by-byte. Fastest.
Default
\w covers scripts up to 2-byte UTF-8 (Latin, Greek, Cyrillic, Hebrew, Arabic, …);
\d and \s are ASCII.
Full
Full Unicode \w/\d/\s (incl. CJK and historic scripts, up to 4-byte UTF-8);
. and negated classes match one full codepoint.
Javascript
ASCII \w/\d/\s, but ., [^...], \W/\D/\S match one full codepoint.
Matches default JS RegExp behavior (no u flag).
Trait Implementations§
Source§impl Clone for UnicodeMode
impl Clone for UnicodeMode
Source§fn clone(&self) -> UnicodeMode
fn clone(&self) -> UnicodeMode
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 UnicodeMode
Source§impl Debug for UnicodeMode
impl Debug for UnicodeMode
Source§impl Default for UnicodeMode
impl Default for UnicodeMode
Source§fn default() -> UnicodeMode
fn default() -> UnicodeMode
Returns the “default value” for a type. Read more
impl Eq for UnicodeMode
Source§impl PartialEq for UnicodeMode
impl PartialEq for UnicodeMode
impl StructuralPartialEq for UnicodeMode
Auto Trait Implementations§
impl Freeze for UnicodeMode
impl RefUnwindSafe for UnicodeMode
impl Send for UnicodeMode
impl Sync for UnicodeMode
impl Unpin for UnicodeMode
impl UnsafeUnpin for UnicodeMode
impl UnwindSafe for UnicodeMode
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