Skip to main content

FromTimeout

Trait FromTimeout 

Source
pub trait FromTimeout {
    // Required method
    fn timed_out() -> Self;
}
Expand description

How to construct the caller’s error type for a per-attempt timeout. Implemented for String (the common test/closure error) and any type convertible from a std::io::Error.

Required Methods§

Source

fn timed_out() -> Self

Build the “connect attempt timed out” value of this error type.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FromTimeout for Error

Source§

fn timed_out() -> Self

Source§

impl FromTimeout for String

Source§

fn timed_out() -> Self

Implementors§