Struct tantivy_fst::automaton::Subsequence
source · [−]pub struct Subsequence<'a> { /* private fields */ }
Expand description
An automaton that matches if the input contains a specific subsequence.
Implementations
sourceimpl<'a> Subsequence<'a>
impl<'a> Subsequence<'a>
sourcepub fn new(subsequence: &'a str) -> Subsequence<'a>
pub fn new(subsequence: &'a str) -> Subsequence<'a>
Constructs automaton that matches input containing the specified subsequence.
Trait Implementations
sourceimpl<'a> Automaton for Subsequence<'a>
impl<'a> Automaton for Subsequence<'a>
type State = usize
type State = usize
The type of the state used in the automaton.
sourcefn can_match(&self, _: &usize) -> bool
fn can_match(&self, _: &usize) -> bool
Returns true if and only if
state
can lead to a match in zero or more
steps. Read moresourcefn will_always_match(&self, state: &usize) -> bool
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 moresourcefn accept(&self, state: &usize, byte: u8) -> usize
fn accept(&self, state: &usize, byte: u8) -> usize
Return the next state given
state
and an input.sourcefn starts_with(self) -> StartsWith<Self>where
Self: Sized,
fn starts_with(self) -> StartsWith<Self>where
Self: Sized,
Returns an automaton that matches the strings that start with something
this automaton matches. Read more
sourcefn union<Rhs: Automaton>(self, rhs: Rhs) -> Union<Self, Rhs>where
Self: Sized,
fn union<Rhs: Automaton>(self, rhs: Rhs) -> Union<Self, Rhs>where
Self: Sized,
Returns an automaton that matches the strings matched by either this or
the other automaton. Read more
sourcefn intersection<Rhs: Automaton>(self, rhs: Rhs) -> Intersection<Self, Rhs>where
Self: Sized,
fn intersection<Rhs: Automaton>(self, rhs: Rhs) -> Intersection<Self, Rhs>where
Self: Sized,
Returns an automaton that matches the strings matched by both this and
the other automaton. Read more
sourcefn complement(self) -> Complement<Self>where
Self: Sized,
fn complement(self) -> Complement<Self>where
Self: Sized,
Returns an automaton that matches the strings not matched by this
automaton. Read more
sourceimpl<'a> Clone for Subsequence<'a>
impl<'a> Clone for Subsequence<'a>
sourcefn clone(&self) -> Subsequence<'a>
fn clone(&self) -> Subsequence<'a>
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for Subsequence<'a>
impl<'a> Debug for Subsequence<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Subsequence<'a>
impl<'a> Send for Subsequence<'a>
impl<'a> Sync for Subsequence<'a>
impl<'a> Unpin for Subsequence<'a>
impl<'a> UnwindSafe for Subsequence<'a>
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more