pub trait ShouldRetry {
    // Required method
    fn should_retry(&self) -> bool;
}
Expand description

Check an error return value for timeouts.

Due to the fact that timeouts are reported as errors, calling read_frame on a socket with a timeout that does not receive a frame in time will result in an error being returned. This trait adds a should_retry method to Error and Result to check for this condition.

Required Methods§

source

fn should_retry(&self) -> bool

Check for timeout

If true, the error is probably due to a timeout.

Implementations on Foreign Types§

source§

impl ShouldRetry for Error

source§

impl<E: Debug> ShouldRetry for Result<E>

Implementors§