pub struct Match<'a> { /* private fields */ }
Expand description
Holds regex_automata::util::captures::Captures
and full input
Implementations§
source§impl<'a> Match<'a>
impl<'a> Match<'a>
sourcepub unsafe fn new(captures: Captures, input: &'a str) -> Self
pub unsafe fn new(captures: Captures, input: &'a str) -> Self
§Safety
Constructing with invalid Captures will cause UB in Match::get_range
and
Match::get_match
pub fn get_captures(&self) -> &Captures
pub fn get_input(&self) -> &'a str
sourcepub fn interpolate(&self, template: &str) -> String
pub fn interpolate(&self, template: &str) -> String
Uses regex interpolation syntax to use current match in template
sourcepub fn mimic_case(&self, template: String) -> String
pub fn mimic_case(&self, template: String) -> String
Tries to match string case for current match
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Match<'a>
impl<'a> Send for Match<'a>
impl<'a> Sync for Match<'a>
impl<'a> Unpin for Match<'a>
impl<'a> UnwindSafe for Match<'a>
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