pub struct Match {
pub pattern_index: usize,
pub matched: String,
pub captures: Vec<String>,
pub before: String,
pub after: String,
}Expand description
A match result from an expect operation.
Fields§
§pattern_index: usizeThe index of the pattern that matched (for multi-pattern expects).
matched: StringThe full text that matched.
captures: Vec<String>Capture groups from regex patterns.
before: StringText before the match.
after: StringText after the match (remaining in buffer).
Implementations§
Trait Implementations§
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