Enum regex::dfa::Result [−][src]
pub enum Result<T> { Match(T), NoMatch(usize), Quit, }
The result of running the DFA.
Generally, the result is either a match or not a match, but sometimes the DFA runs too slowly because the cache size is too small. In that case, it gives up with the intent of falling back to the NFA algorithm.
The DFA can also give up if it runs out of room to create new states, or if it sees non-ASCII bytes in the presence of a Unicode word boundary.
Variants
Match(T)
NoMatch(usize)
Quit
Methods
impl<T> Result<T>
[src]
impl<T> Result<T>
pub fn is_match(&self) -> bool
[src]
pub fn is_match(&self) -> bool
Returns true if this result corresponds to a match.
pub fn map<U, F: FnMut(T) -> U>(self, f: F) -> Result<U>
[src]
pub fn map<U, F: FnMut(T) -> U>(self, f: F) -> Result<U>
Maps the given function onto T and returns the result.
If this isn't a match, then this is a no-op.
fn set_non_match(self, at: usize) -> Result<T>
[src]
fn set_non_match(self, at: usize) -> Result<T>
Sets the non-match position.
If this isn't a non-match, then this is a no-op.
Trait Implementations
impl<T: Clone> Clone for Result<T>
[src]
impl<T: Clone> Clone for Result<T>
fn clone(&self) -> Result<T>
[src]
fn clone(&self) -> Result<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> Debug for Result<T>
[src]
impl<T: Debug> Debug for Result<T>