Enum Anchored
#[non_exhaustive]
pub enum Anchored
The type of anchored search to perform.
If an Aho-Corasick searcher does not support the anchored mode selected, then the search will return an error or panic, depending on whether a fallible or an infallible routine was called.
Variants
-
No Run an unanchored search. This means a match may occur anywhere at or after the start position of the search up until the end position of the search.
-
Yes Run an anchored search. This means that a match must begin at the start position of the search and end before the end position of the search.
Implementations
impl Anchored
fn is_anchored(&self) -> boolReturns true if and only if this anchor mode corresponds to an anchored search.
Example
use aho_corasick::Anchored; assert!(!Anchored::No.is_anchored()); assert!(Anchored::Yes.is_anchored());
Trait Implementations
impl Clone for Anchored
fn clone(&self) -> Self
impl Copy for Anchored
impl Debug for Anchored
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Anchored
impl PartialEq for Anchored
fn eq(&self, other: &Self) -> bool