Trait vex_rt::rtos::Selectable
source · pub trait Selectable<T = ()>: Sized {
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.