Struct regex_automata::dense::PremultipliedByteClass[][src]

pub struct PremultipliedByteClass<T: AsRef<[S]>, S: StateID>(_);
Expand description

The default configuration of a dense DFA, which uses byte classes and premultiplies its state identifiers.

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 PremultipliedByteClass<T, S>[src]

fn clone(&self) -> PremultipliedByteClass<T, S>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: AsRef<[S]>, S: StateID> DFA for PremultipliedByteClass<T, S>[src]

type ID = S

The representation used for state identifiers in this DFA. Read more

fn start_state(&self) -> S[src]

Return the identifier of this DFA’s start state.

fn is_match_state(&self, id: S) -> bool[src]

Returns true if and only if the given identifier corresponds to a match state. Read more

fn is_dead_state(&self, id: S) -> bool[src]

Returns true if and only if the given identifier corresponds to a dead state. When a DFA enters a dead state, it is impossible to leave and thus can never lead to a match. Read more

fn is_match_or_dead_state(&self, id: S) -> bool[src]

Returns true if and only if the given identifier corresponds to either a dead state or a match state, such that one of is_match_state(id) or is_dead_state(id) must return true. Read more

fn is_anchored(&self) -> bool[src]

Returns true if and only if this DFA is anchored. Read more

fn next_state(&self, current: S, input: u8) -> S[src]

Given the current state that this DFA is in and the next input byte, this method returns the identifier of the next state. The identifier returned is always valid, but it may correspond to a dead state. Read more

unsafe fn next_state_unchecked(&self, current: S, input: u8) -> S[src]

Like next_state, but its implementation may look up the next state without memory safety checks such as bounds checks. As such, callers must ensure that the given identifier corresponds to a valid DFA state. Implementors must, in turn, ensure that this routine is safe for all valid state identifiers and for all possible u8 values. Read more

fn is_match(&self, bytes: &[u8]) -> bool[src]

Returns true if and only if the given bytes match this DFA. Read more

fn shortest_match(&self, bytes: &[u8]) -> Option<usize>[src]

Returns the first position at which a match is found. Read more

fn find(&self, bytes: &[u8]) -> Option<usize>[src]

Returns the end offset of the longest match. If no match exists, then None is returned. Read more

fn rfind(&self, bytes: &[u8]) -> Option<usize>[src]

Returns the start offset of the longest match in reverse, by searching from the end of the input towards the start of the input. If no match exists, then None is returned. In other words, this has the same match semantics as find, but in reverse. Read more

fn is_match_at(&self, bytes: &[u8], start: usize) -> bool[src]

Returns the same as is_match, but starts the search at the given offset. Read more

fn shortest_match_at(&self, bytes: &[u8], start: usize) -> Option<usize>[src]

Returns the same as shortest_match, but starts the search at the given offset. Read more

fn find_at(&self, bytes: &[u8], start: usize) -> Option<usize>[src]

Returns the same as find, but starts the search at the given offset. Read more

fn rfind_at(&self, bytes: &[u8], start: usize) -> Option<usize>[src]

Returns the same as rfind, but starts the search at the given offset. Read more

impl<T: Debug + AsRef<[S]>, S: Debug + StateID> Debug for PremultipliedByteClass<T, S>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T, S> RefUnwindSafe for PremultipliedByteClass<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, S> Send for PremultipliedByteClass<T, S> where
    S: Send,
    T: Send

impl<T, S> Sync for PremultipliedByteClass<T, S> where
    S: Sync,
    T: Sync

impl<T, S> Unpin for PremultipliedByteClass<T, S> where
    S: Unpin,
    T: Unpin

impl<T, S> UnwindSafe for PremultipliedByteClass<T, S> where
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.