pub struct AdaptiveTimeoutManager { /* private fields */ }Expand description
Adaptive timeout manager for network condition awareness
Implementations§
Source§impl AdaptiveTimeoutManager
impl AdaptiveTimeoutManager
Sourcepub async fn start(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn start(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Start the adaptive timeout manager with network monitoring
Sourcepub async fn calculate_timeout(&self, operation: OperationType) -> Duration
pub async fn calculate_timeout(&self, operation: OperationType) -> Duration
Calculate adaptive timeout for an operation
Sourcepub async fn record_measurement(
&self,
rtt: Duration,
packet_loss: bool,
bandwidth: Option<u64>,
)
pub async fn record_measurement( &self, rtt: Duration, packet_loss: bool, bandwidth: Option<u64>, )
Record network measurement for adaptive timeout calculation
Sourcepub async fn get_network_conditions(&self) -> NetworkConditions
pub async fn get_network_conditions(&self) -> NetworkConditions
Get current network conditions
Sourcepub async fn get_stats(&self) -> AdaptiveTimeoutStats
pub async fn get_stats(&self) -> AdaptiveTimeoutStats
Get adaptive timeout statistics
Trait Implementations§
Source§impl Debug for AdaptiveTimeoutManager
impl Debug for AdaptiveTimeoutManager
Auto Trait Implementations§
impl Freeze for AdaptiveTimeoutManager
impl RefUnwindSafe for AdaptiveTimeoutManager
impl Send for AdaptiveTimeoutManager
impl Sync for AdaptiveTimeoutManager
impl Unpin for AdaptiveTimeoutManager
impl UnwindSafe for AdaptiveTimeoutManager
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