Struct Transition
struct Transition { ... }
A single transition to another state.
This transition may only be followed if the current byte in the haystack falls in the inclusive range of bytes specified.
Fields
start: u8The inclusive start of the byte range.
end: u8The inclusive end of the byte range.
next: StateIDThe identifier of the state to transition to.
Implementations
impl Transition
fn matches(self: &Self, haystack: &[u8], at: usize) -> boolReturns true if the position
atinhaystackfalls in this transition's range of bytes.If
at >= haystack.len(), then this returnsfalse.fn matches_unit(self: &Self, unit: Unit) -> boolReturns true if the given alphabet unit falls in this transition's range of bytes. If the given unit is
EOI, then this returnsfalse.fn matches_byte(self: &Self, byte: u8) -> boolReturns true if the given byte falls in this transition's range of bytes.
impl Clone for Transition
fn clone(self: &Self) -> Transition
impl Copy for Transition
impl Debug for Transition
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Transition
impl Freeze for Transition
impl Hash for Transition
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for Transition
fn eq(self: &Self, other: &Transition) -> bool
impl RefUnwindSafe for Transition
impl Send for Transition
impl StructuralPartialEq for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl UnwindSafe for Transition
impl<T> Any for Transition
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Transition
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Transition
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Transition
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Transition
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Transition
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Transition
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Transition
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Transition
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>