Struct regex_automata::dense::ByteClass [−][src]
A dense DFA that shrinks its alphabet.
Alphabet shrinking is achieved by using a set of equivalence classes instead of using all possible byte values. Any two bytes belong to the same equivalence class if and only if they can be used interchangeably anywhere in the DFA while never discriminating between a match and a non-match.
This type of DFA can result in significant space reduction with a very small match time performance penalty.
Generally, it isn’t necessary to use this type directly, since a DenseDFA
can be used for searching directly. One possible reason why one might want
to use this type directly is if you are implementing your own search
routines by walking a DFA’s transitions directly. In that case, you’ll want
to use this type (or any of the other DFA variant types) directly, since
they implement next_state
more efficiently.
Trait Implementations
impl<T: Clone + AsRef<[S]>, S: Clone + StateID> Clone for ByteClass<T, S>
[src]
fn clone(&self) -> ByteClass<T, S>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: AsRef<[S]>, S: StateID> DFA for ByteClass<T, S>
[src]
type ID = S
The representation used for state identifiers in this DFA. Read more
fn start_state(&self) -> S
[src]
fn is_match_state(&self, id: S) -> bool
[src]
fn is_dead_state(&self, id: S) -> bool
[src]
fn is_match_or_dead_state(&self, id: S) -> bool
[src]
fn is_anchored(&self) -> bool
[src]
fn next_state(&self, current: S, input: u8) -> S
[src]
unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S
[src]
fn is_match(&self, bytes: &[u8]) -> bool
[src]
fn shortest_match(&self, bytes: &[u8]) -> Option<usize>
[src]
fn find(&self, bytes: &[u8]) -> Option<usize>
[src]
fn rfind(&self, bytes: &[u8]) -> Option<usize>
[src]
fn is_match_at(&self, bytes: &[u8], start: usize) -> bool
[src]
fn shortest_match_at(&self, bytes: &[u8], start: usize) -> Option<usize>
[src]
fn find_at(&self, bytes: &[u8], start: usize) -> Option<usize>
[src]
fn rfind_at(&self, bytes: &[u8], start: usize) -> Option<usize>
[src]
impl<T: Debug + AsRef<[S]>, S: Debug + StateID> Debug for ByteClass<T, S>
[src]
Auto Trait Implementations
impl<T, S> Send for ByteClass<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> Sync for ByteClass<T, S> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<T, S> Unpin for ByteClass<T, S> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,