pub struct MigrationConfig {
pub auto_migrate: bool,
pub migration_timeout: Duration,
pub max_retry_attempts: usize,
pub retry_backoff: Duration,
pub migration_cooldown: Duration,
pub keep_old_path: bool,
pub validate_new_path: bool,
}Expand description
Connection migration configuration
Fields§
§auto_migrate: boolEnable automatic migration on network changes
migration_timeout: DurationMaximum time to wait for migration to complete
max_retry_attempts: usizeMaximum number of migration retry attempts
retry_backoff: DurationBackoff duration between retry attempts
migration_cooldown: DurationMinimum time between migrations for the same connection
keep_old_path: boolKeep old path alive during migration (default: true for safety)
validate_new_path: boolValidate new path before closing old path
Implementations§
Source§impl MigrationConfig
impl MigrationConfig
Sourcepub fn mobile() -> Self
pub fn mobile() -> Self
Create a mobile-optimized configuration
Aggressive migration settings for mobile devices that frequently switch between WiFi and cellular networks.
Sourcepub fn conservative() -> Self
pub fn conservative() -> Self
Create a conservative configuration
More cautious migration settings for stable networks where migrations are rare.
Trait Implementations§
Source§impl Clone for MigrationConfig
impl Clone for MigrationConfig
Source§fn clone(&self) -> MigrationConfig
fn clone(&self) -> MigrationConfig
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 MigrationConfig
impl Debug for MigrationConfig
Auto Trait Implementations§
impl Freeze for MigrationConfig
impl RefUnwindSafe for MigrationConfig
impl Send for MigrationConfig
impl Sync for MigrationConfig
impl Unpin for MigrationConfig
impl UnwindSafe for MigrationConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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>
Converts
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>
Converts
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 more