[][src]Struct grok::Matches

pub struct Matches<'a> { /* fields omitted */ }

The Matches represent matched results from a Pattern against text.

Methods

impl<'a> Matches<'a>[src]

pub fn new(captures: Captures<'a>, names: &'a HashMap<String, u32>) -> Self[src]

Instantiates the matches for a pattern after the match.

pub fn get(&self, name_or_alias: &str) -> Option<&str>[src]

Gets the value for the name (or) alias if found, None otherwise.

pub fn len(&self) -> usize[src]

Returns the number of matches.

pub fn is_empty(&self) -> bool[src]

Returns true if there are no matches, false otherwise.

Important traits for MatchesIter<'a>
pub fn iter(&'a self) -> MatchesIter<'a>[src]

Returns a tuple of key/value with all the matches found.

Note that if no match is found, the value is empty.

Trait Implementations

impl<'a> Debug for Matches<'a>[src]

Auto Trait Implementations

impl<'a> !Send for Matches<'a>

impl<'a> !Sync for Matches<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.