Enum email_parser::fsm::State
source · pub enum State {
AddrSpec,
LocalAtom,
LocalQText,
LocalDot,
LocalEscape,
LocalQString,
LocalPart,
DomainAtom,
DomainDText,
DomainDot,
DomainLiteral,
Error,
}
Expand description
The set of possible states in a DFA that represents a language accepting all valid email addresses. State::Error is a dead state (or trap state).
Variants§
AddrSpec
LocalAtom
LocalQText
LocalDot
LocalEscape
LocalQString
LocalPart
DomainAtom
DomainDText
DomainDot
DomainLiteral
Error
Implementations§
source§impl State
impl State
Certain symbols and group of symbols useful for determining transition rules.
const DQUOTE: char = '"'
const DOT: char = '.'
const BACKSLASH: char = '\\'
const AT: char = '@'
const OPEN_BRACKET: char = '['
const CLOSE_BRACKET: char = ']'
fn is_atext(c: char) -> bool
fn is_qtext(c: char) -> bool
fn is_dtext(c: char) -> bool
fn is_escape(c: char) -> bool
Trait Implementations§
source§impl FSM<State> for State
impl FSM<State> for State
State implements FSM and defines a DFA for language accepting all valid email addresses. The set of states in DFA is itself. All transitions are defined in the implementation itself. Start state of DFA is State::AddrSpec.
impl Copy for State
Auto Trait Implementations§
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