Struct regex_test::Match
source · pub struct Match {
pub id: usize,
pub span: Span,
}
Expand description
A single match, consisting of the pattern that matched and its span.
Fields§
§id: usize
The ID of the pattern that matched.
This is always 0
for single-pattern regexes. Otherwise, patterns
start at 0
and count upwards in increments of 1
.
span: Span
The span of the overall match.
Trait Implementations§
source§impl From<Match> for Captures
impl From<Match> for Captures
Converts a plain Match
to a Captures
value, where the match corresponds
to the first and only group in Captures
.
source§impl PartialEq<Match> for Match
impl PartialEq<Match> for Match
impl Copy for Match
impl Eq for Match
impl StructuralEq for Match
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.