#[non_exhaustive]#[repr(u8)]pub enum ConnectionState {
Connecting = 0,
ClassicalReady = 1,
PqcUpgrading = 2,
PqcReady = 3,
Connected = 4,
Failed = 5,
Closed = 6,
Migrating = 7,
Dead = 8,
}std only.Expand description
Connection state for PhantomSession.
The session is usable from the moment it’s created — sends are queued until the handshake completes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connecting = 0
Connection initiated, handshake pending
ClassicalReady = 1
Classical (X25519) channel established — data flows
PqcUpgrading = 2
PQC upgrade in progress
PqcReady = 3
Full hybrid PQC protection active
Connected = 4
Fully connected and operational
Failed = 5
Connection failed
Closed = 6
Gracefully closed
Migrating = 7
The active path went silent (liveness lost); the session is held alive
(keys retained, outbound buffered) awaiting a migrate() or the path’s
return. The embedder reacts by calling migrate() (Phase 4 / P4.3).
Dead = 8
The session is dead: the path stayed down past the migration idle-timeout
with no recovery. Terminal — recv() errors instead of hanging (P4.3).
Implementations§
Source§impl ConnectionState
impl ConnectionState
Sourcepub fn is_data_ready(&self) -> bool
pub fn is_data_ready(&self) -> bool
Whether data can flow (classical or better). Migrating counts as ready:
the keep-alive window still accepts send() (buffered + retransmitted until
the path recovers), so the embedder’s send path doesn’t error mid-migration.
Trait Implementations§
Source§impl Clone for ConnectionState
impl Clone for ConnectionState
Source§fn clone(&self) -> ConnectionState
fn clone(&self) -> ConnectionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for ConnectionState
impl<UT> ConvertError<UT> for ConnectionState
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
impl Copy for ConnectionState
Source§impl Debug for ConnectionState
impl Debug for ConnectionState
impl Eq for ConnectionState
Source§impl<UT> FfiConverter<UT> for ConnectionState
Available on crate feature bindings only.
impl<UT> FfiConverter<UT> for ConnectionState
bindings only.