pub struct Options {
pub capture: bool,
pub shorthand: bool,
pub wrap: bool,
}Expand description
Options controlling the generated regex. Construct with Options::default and
the builder methods.
use to_regex_range::Options;
let opts = Options::default().capture(true).shorthand(true);Fields§
§capture: boolWrap the result in a capture group ( … ) instead of (?: … ).
shorthand: boolUse \d instead of [0-9].
wrap: boolWrap a multi-alternative result in (?: … ) (the default).
Implementations§
Source§impl Options
impl Options
Sourcepub fn capture(self, value: bool) -> Self
pub fn capture(self, value: bool) -> Self
See Options::capture.
Sourcepub fn shorthand(self, value: bool) -> Self
pub fn shorthand(self, value: bool) -> Self
See Options::shorthand.
Sourcepub fn wrap(self, value: bool) -> Self
pub fn wrap(self, value: bool) -> Self
See Options::wrap.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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