//! Wire decoder resynchronization state.
/// Decoder resynchronization state.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]pubenumResyncState{/// Decoder is aligned and waiting for envelope bytes.
Aligned,/// Decoder needs more bytes to decide whether the current prefix is valid.
NeedMore,/// Decoder is scanning for the next magic value.
Scanning,/// Decoder found a candidate magic prefix.
Candidate {/// Offset where the candidate starts.
offset:usize,},}implResyncState{/// Returns whether the decoder is aligned.
#[must_use]pubconstfnis_aligned(self)->bool{matches!(self,Self::Aligned)}}