struct PrefixOf<'a> {
prefix_of: &'a [u8],
}Expand description
Implements [fst::Automaton]
It will match if prefix_of is a prefix of the given data.
Fields§
§prefix_of: &'a [u8]Implementations§
Trait Implementations§
Source§impl Automaton for PrefixOf<'_>
impl Automaton for PrefixOf<'_>
Source§fn can_match(&self, state: &usize) -> bool
fn can_match(&self, state: &usize) -> bool
Returns true if and only if
state can lead to a match in zero or more
steps. Read moreSource§fn accept(&self, state: &usize, byte: u8) -> usize
fn accept(&self, state: &usize, byte: u8) -> usize
Return the next state given
state and an input.§fn will_always_match(&self, _state: &Self::State) -> bool
fn will_always_match(&self, _state: &Self::State) -> bool
Returns true if and only if
state matches and must match no matter
what steps are taken. Read more§fn accept_eof(&self, _: &Self::State) -> Option<Self::State>
fn accept_eof(&self, _: &Self::State) -> Option<Self::State>
If applicable, return the next state when the end of a key is seen.
§fn 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.
§fn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs>where
Rhs: Automaton,
Self: Sized,
fn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs>where
Rhs: Automaton,
Self: Sized,
Returns an automaton that matches the strings matched by either this or
the other automaton.
§fn intersection<Rhs>(self, rhs: Rhs) -> Intersection<Self, Rhs>where
Rhs: Automaton,
Self: Sized,
fn intersection<Rhs>(self, rhs: Rhs) -> Intersection<Self, Rhs>where
Rhs: Automaton,
Self: Sized,
Returns an automaton that matches the strings matched by both this and
the other automaton.
§fn 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.
Auto Trait Implementations§
impl<'a> Freeze for PrefixOf<'a>
impl<'a> RefUnwindSafe for PrefixOf<'a>
impl<'a> Send for PrefixOf<'a>
impl<'a> Sync for PrefixOf<'a>
impl<'a> Unpin for PrefixOf<'a>
impl<'a> UnsafeUnpin for PrefixOf<'a>
impl<'a> UnwindSafe for PrefixOf<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more