pub enum RecvPhase {
AwaitingHandshake,
AwaitingSnapshot,
Streaming,
}Expand description
The receiver-side state machine for one direction (SPEC §5.3).
AwaitingHandshake --handshake(ok)--> AwaitingSnapshot --snapshot--> StreamingA data message before the handshake, a delta before the snapshot, or a second snapshot is a
protocol violation (code 6).
Variants§
AwaitingHandshake
No valid handshake seen yet — the only acceptable inbound message is pex_handshake.
AwaitingSnapshot
Handshake accepted; awaiting the single pex_snapshot that opens the data stream.
Streaming
Snapshot seen; pex_deltas flow (subject to the SPEC §6.4 arrival floor).
Trait Implementations§
impl Copy for RecvPhase
impl Eq for RecvPhase
impl StructuralPartialEq for RecvPhase
Auto Trait Implementations§
impl Freeze for RecvPhase
impl RefUnwindSafe for RecvPhase
impl Send for RecvPhase
impl Sync for RecvPhase
impl Unpin for RecvPhase
impl UnsafeUnpin for RecvPhase
impl UnwindSafe for RecvPhase
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