pub enum DynParseState {
Show 16 variants
Start,
MagicString,
MsgId,
TypeId,
BitField,
Version,
SameDc,
Star,
DataLen,
Data,
SpacesBeforePayloadLen,
PayloadLen,
CrlfBeforeDone,
Done,
PostDone,
Unknown,
}Expand description
Parser state transitions.
Each variant matches a state in the reference engine’s
dyn_parse_state_t. The numeric values match the C enum’s
numeric values to keep external parity tooling honest.
Variants§
Start
Initial state; consumes leading whitespace until the magic literal is observed.
MagicString
$2014$ was matched; awaiting the trailing space.
MsgId
Reading the decimal message id.
TypeId
Reading the decimal message type.
BitField
Reading the decimal flags bit field.
Version
Reading the decimal protocol version.
SameDc
Reading the same-datacenter digit.
Star
Awaiting the leading * before the data length.
DataLen
Reading the decimal data length.
Data
Consuming the inline data of mlen bytes.
SpacesBeforePayloadLen
Skipping spaces before the payload-length marker.
PayloadLen
Reading the decimal payload length.
CrlfBeforeDone
Awaiting the LF that terminates the header.
Done
Header complete; payload position recorded.
PostDone
Header complete and post-handshake decryption applied.
Unknown
Recovery state after the parser hit a malformed byte.
Trait Implementations§
Source§impl Clone for DynParseState
impl Clone for DynParseState
Source§fn clone(&self) -> DynParseState
fn clone(&self) -> DynParseState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DynParseState
impl Debug for DynParseState
Source§impl Default for DynParseState
impl Default for DynParseState
Source§fn default() -> DynParseState
fn default() -> DynParseState
Source§impl PartialEq for DynParseState
impl PartialEq for DynParseState
Source§fn eq(&self, other: &DynParseState) -> bool
fn eq(&self, other: &DynParseState) -> bool
self and other values to be equal, and is used by ==.impl Copy for DynParseState
impl Eq for DynParseState
impl StructuralPartialEq for DynParseState
Auto Trait Implementations§
impl Freeze for DynParseState
impl RefUnwindSafe for DynParseState
impl Send for DynParseState
impl Sync for DynParseState
impl Unpin for DynParseState
impl UnsafeUnpin for DynParseState
impl UnwindSafe for DynParseState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.