Struct regex::re_bytes::Match [−][src]
Match represents a single match of a regex in a haystack.
The lifetime parameter 't
refers to the lifetime of the matched text.
Fields
text: &'t [u8]
start: usize
end: usize
Methods
impl<'t> Match<'t>
[src]
impl<'t> Match<'t>
pub fn start(&self) -> usize
[src]
pub fn start(&self) -> usize
Returns the starting byte offset of the match in the haystack.
pub fn end(&self) -> usize
[src]
pub fn end(&self) -> usize
Returns the ending byte offset of the match in the haystack.
pub fn as_bytes(&self) -> &'t [u8]
[src]
pub fn as_bytes(&self) -> &'t [u8]
Returns the matched text.
fn new(haystack: &'t [u8], start: usize, end: usize) -> Match<'t>
[src]
fn new(haystack: &'t [u8], start: usize, end: usize) -> Match<'t>
Creates a new match from the given haystack and byte offsets.
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) -> Result
Formats the value using the given formatter. Read more
impl<'t> Eq for Match<'t>
[src]
impl<'t> Eq for Match<'t>
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl<'t> PartialEq for Match<'t>
[src]
impl<'t> PartialEq for Match<'t>