Thanks to visit codestin.com
Credit goes to docs.rs

ShouldRetry

Trait ShouldRetry 

Source
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.

Implementors§