Skip to main content

NetExt

Trait NetExt 

Source
pub trait NetExt: Net + Sized {
    // Provided methods
    fn with_retry(
        self,
        policy: RetryPolicy,
        cancel: CancellationToken,
    ) -> RetryNet<Self, DefaultRetryPolicy> { ... }
    fn with_timeout(self, timeout: Duration) -> TimeoutNet<Self> { ... }
}

Provided Methods§

Source

fn with_retry( self, policy: RetryPolicy, cancel: CancellationToken, ) -> RetryNet<Self, DefaultRetryPolicy>

Add retry layer

Source

fn with_timeout(self, timeout: Duration) -> TimeoutNet<Self>

Add timeout layer

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Net> NetExt for T