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.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.