pub struct Match {
pub pattern_id: usize,
pub start: usize,
pub end: usize,
}Expand description
One occurrence reported by the automaton.
The matched substring is text[start..end]; end is exclusive and equals
start + len where len is the length of pattern pattern_id.
Fields§
§pattern_id: usizeIndex of the matched pattern in the original patterns slice.
start: usizeStart byte offset of the occurrence within the scanned text.
end: usizeEnd byte offset (exclusive) of the occurrence within the scanned text.
Trait Implementations§
impl Copy for Match
impl Eq for Match
Source§impl Ord for Match
impl Ord for Match
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Match
impl PartialOrd 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 UnsafeUnpin 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