Struct regex::dfa::Transitions[][src]

struct Transitions {
    table: Vec<u32>,
    num_byte_classes: usize,
}

The transition table.

It is laid out in row-major order, with states as rows and byte class transitions as columns.

The transition table is responsible for producing valid StatePtrs. A StatePtr points to the start of a particular row in this table. When indexing to find the next state this allows us to avoid a multiplication when computing an index into the table.

Fields

The table.

The stride.

Methods

impl Transitions
[src]

Create a new transition table.

The number of byte classes corresponds to the stride. Every state will have num_byte_classes slots for transitions.

Returns the total number of states currently in this table.

Allocates room for one additional state and returns a pointer to it.

If there's no more room, None is returned.

Clears the table of all states.

Sets the transition from (si, cls) to next.

Returns the transition corresponding to (si, cls).

The heap size, in bytes, of a single state in the transition table.

Like next, but uses unchecked access and is therefore unsafe.

Trait Implementations

impl Clone for Transitions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Transitions
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Transitions

impl Sync for Transitions