Trait socketcan::socket::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§
sourcefn should_retry(&self) -> bool
fn should_retry(&self) -> bool
Check for timeout
If true
, the error is probably due to a timeout.