pub trait Selectable<T = ()>: Sized {
// Required methods
fn poll(self) -> Result<T, Self>;
fn sleep(&self) -> GenericSleep;
}Expand description
Represents a future event which can be used with the
select! macro.
Required Methods§
Sourcefn poll(self) -> Result<T, Self>
fn poll(self) -> Result<T, Self>
Processes the event if it is ready, consuming the event object; otherwise, it provides a replacement event object.
Sourcefn sleep(&self) -> GenericSleep
fn sleep(&self) -> GenericSleep
Gets the earliest time that the event could be ready.
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.