pub enum UnicodeMode {
Ascii,
Unicode,
Full,
}Expand description
configuration for pattern compilation and engine behavior.
all options have sensible defaults via Default. use the builder
methods to override:
use resharp::EngineOptions;
let opts = EngineOptions::default()
.unicode(false) // ASCII-only \w, \d, \s
.case_insensitive(true) // global (?i)
.dot_matches_new_line(true); // . matches \nControls which Unicode character tables \w and \d use.
Variants§
Ascii
ASCII only: \w = [a-zA-Z0-9_], \d = [0-9].
Unicode
Default: covers major scripts up through U+07FF (Latin, Greek, Cyrillic, Hebrew, Arabic, …). All encoded as 1- or 2-byte UTF-8 sequences.
Full
All Unicode word/digit characters, including CJK, historic scripts, and any code points requiring 3- or 4-byte UTF-8 sequences.
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 · 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 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
Source§impl PartialEq for UnicodeMode
impl PartialEq for UnicodeMode
impl Copy for UnicodeMode
impl Eq 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