Struct regex_automata::util::determinize::state::State
source · pub(crate) struct State(Arc<[u8]>);
Expand description
A DFA state that, at its core, is represented by an ordered set of NFA states.
This type is intended to be used only in NFA-to-DFA conversion via powerset construction.
It may be cheaply cloned and accessed safely from multiple threads simultaneously.
Tuple Fields§
§0: Arc<[u8]>
Implementations§
source§impl State
impl State
For docs on these routines, see the internal Repr and ReprVec types below.
pub(crate) fn dead() -> State
pub(crate) fn is_match(&self) -> bool
pub(crate) fn is_from_word(&self) -> bool
pub(crate) fn is_half_crlf(&self) -> bool
pub(crate) fn look_have(&self) -> LookSet
pub(crate) fn look_need(&self) -> LookSet
pub(crate) fn match_len(&self) -> usize
pub(crate) fn match_pattern(&self, index: usize) -> PatternID
pub(crate) fn match_pattern_ids(&self) -> Option<Vec<PatternID>>
pub(crate) fn iter_nfa_state_ids<F: FnMut(StateID)>(&self, f: F)
pub(crate) fn memory_usage(&self) -> usize
fn repr(&self) -> Repr<'_>
Trait Implementations§
source§impl Borrow<[u8]> for State
impl Borrow<[u8]> for State
This Borrow impl permits us to lookup any state in a map by its byte representation. This is particularly convenient when one has a StateBuilder and we want to see if a correspondingly equivalent state already exists. If one does exist, then we can reuse the allocation required by StateBuilder without having to convert it into a State first.
source§impl Ord for State
impl Ord for State
source§impl PartialEq for State
impl PartialEq for State
source§impl PartialOrd for State
impl PartialOrd for State
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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