Struct fst_subseq_ascii_caseless::SubseqAsciiCaseless [−][src]
pub struct SubseqAsciiCaseless<'a> { /* fields omitted */ }
An automaton that matches if the input contains a specific subsequence ignoring ASCII case.
It is similar to fst::automaton::Subsequence
, and can be used to build
a simple fuzzy-finder for ASCII-only content.
Methods
impl<'a> SubseqAsciiCaseless<'a>
[src]
impl<'a> SubseqAsciiCaseless<'a>
pub fn new(subseq: &'a str) -> Self
[src]
pub fn new(subseq: &'a str) -> Self
Constructs automaton that matches input containing the specified subsequence ignoring ASCII case.
Panics
Panics if subseq
contains any ASCII uppercase character.
pub fn new_unchecked(subseq: &'a str) -> Self
[src]
pub fn new_unchecked(subseq: &'a str) -> Self
Same as new()
but don't check the string.
It would never match if the subseq contains any ASCII uppercase character.
Trait Implementations
impl<'a> Clone for SubseqAsciiCaseless<'a>
[src]
impl<'a> Clone for SubseqAsciiCaseless<'a>
fn clone(&self) -> SubseqAsciiCaseless<'a>
[src]
fn clone(&self) -> SubseqAsciiCaseless<'a>
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)
Performs copy-assignment from source
. Read more
impl<'a> Debug for SubseqAsciiCaseless<'a>
[src]
impl<'a> Debug for SubseqAsciiCaseless<'a>
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<'a> Automaton for SubseqAsciiCaseless<'a>
[src]
impl<'a> Automaton for SubseqAsciiCaseless<'a>
type State = usize
The type of the state used in the automaton.
fn start(&self) -> usize
[src]
fn start(&self) -> usize
Returns a single start state for this automaton. Read more
fn is_match(&self, state: &usize) -> bool
[src]
fn is_match(&self, state: &usize) -> bool
Returns true if and only if state
is a match state.
fn can_match(&self, _: &usize) -> bool
[src]
fn can_match(&self, _: &usize) -> bool
Returns true if and only if state
can lead to a match in zero or more steps. Read more
fn will_always_match(&self, state: &usize) -> bool
[src]
fn will_always_match(&self, state: &usize) -> bool
Returns true if and only if state
matches and must match no matter what steps are taken. Read more
fn accept(&self, state: &usize, byte: u8) -> usize
[src]
fn accept(&self, state: &usize, byte: u8) -> usize
Return the next state given state
and an input.
fn starts_with(self) -> StartsWith<Self>
[src]
fn starts_with(self) -> StartsWith<Self>
Returns an automaton that matches the strings that start with something this automaton matches. Read more
fn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs> where
Rhs: Automaton,
[src]
fn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs> where
Rhs: Automaton,
Returns an automaton that matches the strings matched by either this or the other automaton. Read more
fn intersection<Rhs>(self, rhs: Rhs) -> Intersection<Self, Rhs> where
Rhs: Automaton,
[src]
fn intersection<Rhs>(self, rhs: Rhs) -> Intersection<Self, Rhs> where
Rhs: Automaton,
Returns an automaton that matches the strings matched by both this and the other automaton. Read more
fn complement(self) -> Complement<Self>
[src]
fn complement(self) -> Complement<Self>
Returns an automaton that matches the strings not matched by this automaton. Read more
Auto Trait Implementations
impl<'a> Send for SubseqAsciiCaseless<'a>
impl<'a> Send for SubseqAsciiCaseless<'a>
impl<'a> Sync for SubseqAsciiCaseless<'a>
impl<'a> Sync for SubseqAsciiCaseless<'a>