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
Converts a plain Match
to a Captures
value, where the match corresponds
to the first and only group in 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
.
impl Copy for Match
impl Eq for Match
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl Freeze for Match
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.