pub trait ToTimeout {
// Required methods
fn timeout(&self) -> Pin<Box<dyn Future<Output = ()> + Send + Sync>>;
fn create(d: Duration) -> Self;
}
Expand description
The interface to start a timeout
Users don’t need to interact with this trait
Required Methods§
fn timeout(&self) -> Pin<Box<dyn Future<Output = ()> + Send + Sync>>
fn create(d: Duration) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.