Trait socketcan::ShouldRetry
[−]
[src]
pub trait ShouldRetry { fn should_retry(&self) -> bool; }
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
fn should_retry(&self) -> bool
Check for timeout
If true
, the error is probably due to a timeout.