Skip to main content

Dfa

Struct Dfa 

Source
pub struct Dfa<I, T = (), E = ()>(/* private fields */);

Implementations§

Source§

impl<I, T, E> Dfa<I, T, E>

Source

pub fn into_states(self) -> DfaStates<I, T, E>

Source§

impl<I, T, E> Dfa<I, T, E>

Source

pub fn new(states: DfaStates<I, T, E>) -> Self

Source

pub fn map_nodes<U, F: FnMut(T) -> U>(self, f: F) -> Dfa<I, U, E>

Source

pub fn try_map_nodes<U, R, F: FnMut(T) -> Result<U, R>>( self, f: F, ) -> Result<Dfa<I, U, E>, R>

Source§

impl<I: Clone + Ord, T, E> Dfa<I, T, E>

Source

pub fn map_edges<G: Clone + PartialEq, F: FnMut(E) -> G>( self, f: F, ) -> Dfa<I, T, G>

Source§

impl<I: Copy + Ord, T, E> Dfa<&I, T, E>

Source

pub fn copied(self) -> Dfa<I, T, E>

Source§

impl<I: Clone + Ord + Hash + Succ, T: Clone + Ord + Hash, E: Clone + Ord + Hash> Dfa<I, T, E>

Source

pub fn optimize(&self) -> Output<I, T, E>

Source§

impl<I: Clone + Ord, T, E: Clone + Ord> Dfa<I, T, E>

Source

pub fn into_nfa(self) -> Nfa<I, T, E>

Source§

impl<I, T: Accept, E: Accept> Dfa<I, T, E>

Source

pub fn dot<'a>( &self, fmt_state: impl Fn(usize) -> Cow<'a, str>, fmt_input: impl Fn(Partition<&I>) -> Cow<'a, str>, fmt_node_tok: impl Fn(&T::Token) -> Option<Cow<'a, str>>, fmt_edge_tok: impl Fn(&E::Token) -> Option<Cow<'a, str>>, ) -> Graph<'a>

Trait Implementations§

Source§

impl<I: Debug, T: Debug, E: Debug> Debug for Dfa<I, T, E>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<I: Clone + Ord, T, E: Clone + Ord> From<Dfa<I, T, E>> for Nfa<I, T, E>

Source§

fn from(value: Dfa<I, T, E>) -> Self

Converts to this type from the input type.
Source§

impl<I: PartialEq, T: PartialEq, E: PartialEq> PartialEq for Dfa<I, T, E>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<I: PartialEq, T: PartialEq, E: PartialEq> StructuralPartialEq for Dfa<I, T, E>

Auto Trait Implementations§

§

impl<I, T, E> Freeze for Dfa<I, T, E>
where Vec<State<I, T, E>>: Freeze,

§

impl<I, T, E> RefUnwindSafe for Dfa<I, T, E>
where Vec<State<I, T, E>>: RefUnwindSafe,

§

impl<I, T, E> Send for Dfa<I, T, E>
where Vec<State<I, T, E>>: Send,

§

impl<I, T, E> Sync for Dfa<I, T, E>
where Vec<State<I, T, E>>: Sync,

§

impl<I, T, E> Unpin for Dfa<I, T, E>
where Vec<State<I, T, E>>: Unpin,

§

impl<I, T, E> UnsafeUnpin for Dfa<I, T, E>
where Vec<State<I, T, E>>: UnsafeUnpin,

§

impl<I, T, E> UnwindSafe for Dfa<I, T, E>
where Vec<State<I, T, E>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.