pub struct DFA<StateType, AlphabetType> { /* private fields */ }Implementations§
Source§impl<S, A> DFA<S, A>
impl<S, A> DFA<S, A>
pub fn new( states: impl IntoIterator<Item = S>, alphabet: impl IntoIterator<Item = A>, transition: impl Fn(S, A) -> S + 'static, start: S, accept: impl IntoIterator<Item = S>, ) -> DFA<S, A>
pub fn states(&self) -> &HashSet<S>
pub fn alphabet(&self) -> &HashSet<A>
pub fn transition_function(&self) -> &Box<dyn Fn(S, A) -> S>
pub fn start_state(&self) -> &S
pub fn accept_states(&self) -> &HashSet<S>
pub fn input(&self, s: impl IntoIterator<Item = A>) -> Status<S>
Auto Trait Implementations§
impl<StateType, AlphabetType> Freeze for DFA<StateType, AlphabetType>where
StateType: Freeze,
impl<StateType, AlphabetType> !RefUnwindSafe for DFA<StateType, AlphabetType>
impl<StateType, AlphabetType> !Send for DFA<StateType, AlphabetType>
impl<StateType, AlphabetType> !Sync for DFA<StateType, AlphabetType>
impl<StateType, AlphabetType> Unpin for DFA<StateType, AlphabetType>
impl<StateType, AlphabetType> !UnwindSafe for DFA<StateType, AlphabetType>
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