pub struct XRegex {
pub literal: (u32, String),
pub data: ReSequence,
pub kind: LiteralForm,
}
Expand description
a collection of regular expression data artifacts
Fields§
§literal: (u32, String)
§data: ReSequence
§kind: LiteralForm
Implementations§
Source§impl XRegex
impl XRegex
Sourcepub fn new(re_text: &str, re_puncts: &[u8]) -> Result<Self, Error>
pub fn new(re_text: &str, re_puncts: &[u8]) -> Result<Self, Error>
XRegex constructor creates XRegex struct with a customised re_puncts
Sourcepub fn get_regex(&mut self) -> Option<Regex>
pub fn get_regex(&mut self) -> Option<Regex>
remove the first regex item from XRegex struct and returns it, or None if it is empty
Sourcepub fn as_regex(&self) -> Option<&Regex>
pub fn as_regex(&self) -> Option<&Regex>
get regex reference to this XRegex struct. None is returned if it is not item kind.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XRegex
impl RefUnwindSafe for XRegex
impl Send for XRegex
impl Sync for XRegex
impl Unpin for XRegex
impl UnwindSafe for XRegex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more