Enum crs_bind::rtos::GenericSleep[][src]

pub enum GenericSleep {
    NotifyTake(Option<Instant>),
    Timestamp(Instant),
}

Represents a future time to sleep until.

Variants

NotifyTake(Option<Instant>)

Represents a future time when a notification occurs. If a timestamp is present, then it represents whichever is earlier.

Timestamp(Instant)

Represents an explicit future timestamp.

Implementations

impl GenericSleep[src]

pub fn sleep(self) -> u32[src]

Sleeps until the future time represented by self. The result is the number of notifications which were present, if the sleep ended due to notification.

pub fn timeout(self) -> Option<Instant>[src]

Get the timestamp represented by self, if it is present.

pub fn combine(self, other: Self) -> Self[src]

Combine two GenericSleep objects to one which represents the earliest possible time of the two.

Trait Implementations

impl Clone for GenericSleep[src]

impl Copy for GenericSleep[src]

impl Debug for GenericSleep[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.