struct EcmaRegexp(String, String);
Tuple Fields§
§0: String
§1: String
Trait Implementations§
Source§impl RegExp for EcmaRegexp
impl RegExp for EcmaRegexp
fn syntax() -> RegexSyntax
Source§fn parse(pattern: &str, flags: &str) -> Result<Self, ()>
fn parse(pattern: &str, flags: &str) -> Result<Self, ()>
Generates a regexp pattern for the given string. If the pattern is
invalid, the parse function should return an error.
Source§fn matches<'a>(&self, text: &'a str) -> Option<Vec<Option<&'a str>>>
fn matches<'a>(&self, text: &'a str) -> Option<Vec<Option<&'a str>>>
Matches the given text against the regular expression and returns the list
of captures. The matches are returned in the order they appear in the
regular expression. It is not prefixed with the full match. For groups
that occur in the regular expression, but did not match, the corresponding
capture should be
None
. Read moreAuto Trait Implementations§
impl Freeze for EcmaRegexp
impl RefUnwindSafe for EcmaRegexp
impl Send for EcmaRegexp
impl Sync for EcmaRegexp
impl Unpin for EcmaRegexp
impl UnwindSafe for EcmaRegexp
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