Struct regex::Match [−][src]
pub struct Match<'t> { /* fields omitted */ }Match represents a single match of a regex in a haystack.
The lifetime parameter 't refers to the lifetime of the matched text.
Methods
impl<'t> Match<'t>[src]
impl<'t> Match<'t>pub fn start(&self) -> usize[src]
pub fn start(&self) -> usizeReturns the starting byte offset of the match in the haystack.
pub fn end(&self) -> usize[src]
pub fn end(&self) -> usizeReturns the ending byte offset of the match in the haystack.
pub fn as_str(&self) -> &'t str[src]
pub fn as_str(&self) -> &'t strReturns the matched text.
Trait Implementations
impl<'t> Copy for Match<'t>[src]
impl<'t> Copy for Match<'t>impl<'t> Clone for Match<'t>[src]
impl<'t> Clone for Match<'t>fn clone(&self) -> Match<'t>[src]
fn clone(&self) -> Match<'t>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<'t> Debug for Match<'t>[src]
impl<'t> Debug for Match<'t>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'t> Eq for Match<'t>[src]
impl<'t> Eq for Match<'t>impl<'t> PartialEq for Match<'t>[src]
impl<'t> PartialEq for Match<'t>fn eq(&self, other: &Match<'t>) -> bool[src]
fn eq(&self, other: &Match<'t>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Match<'t>) -> bool[src]
fn ne(&self, other: &Match<'t>) -> boolThis method tests for !=.
impl<'t> From<Match<'t>> for &'t str[src]
impl<'t> From<Match<'t>> for &'t str