pub enum MigrationState {
RelayOnly,
WaitingToProbe {
probe_at: Instant,
},
ProbeInProgress {
candidates: Vec<SocketAddr>,
started_at: Instant,
},
MigrationPending {
verified_path: SocketAddr,
measured_rtt: Duration,
},
DirectEstablished {
direct_path: SocketAddr,
migrated_at: Instant,
},
FallbackToRelay {
reason: String,
attempts: u32,
},
}Expand description
State of a connection migration attempt
Variants§
RelayOnly
Connection is relay-only, no migration attempted
WaitingToProbe
Waiting for initial delay before probing
ProbeInProgress
Actively probing candidate addresses
Fields
§
candidates: Vec<SocketAddr>Candidate addresses being probed
MigrationPending
A direct path has been validated, migration pending
Fields
§
verified_path: SocketAddrThe validated direct path
DirectEstablished
Successfully migrated to direct path
FallbackToRelay
Migration failed, falling back to relay
Implementations§
Source§impl MigrationState
impl MigrationState
Sourcepub fn is_relayed(&self) -> bool
pub fn is_relayed(&self) -> bool
Check if currently using relay
Sourcepub fn is_migrating(&self) -> bool
pub fn is_migrating(&self) -> bool
Check if migration is in progress
Trait Implementations§
Source§impl Clone for MigrationState
impl Clone for MigrationState
Source§fn clone(&self) -> MigrationState
fn clone(&self) -> MigrationState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MigrationState
impl Debug for MigrationState
Source§impl PartialEq for MigrationState
impl PartialEq for MigrationState
impl Eq for MigrationState
impl StructuralPartialEq for MigrationState
Auto Trait Implementations§
impl Freeze for MigrationState
impl RefUnwindSafe for MigrationState
impl Send for MigrationState
impl Sync for MigrationState
impl Unpin for MigrationState
impl UnwindSafe for MigrationState
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.