Struct mini_gl_fb::breakout::Wakeup[][src]

#[non_exhaustive]pub struct Wakeup {
    pub when: Instant,
    pub id: u32,
}

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
when: Instant

The Instant at which this wakeup is scheduled to happen. If the Instant is in the past, the wakeup will happen instantly.

id: u32

A numeric identifier that can be used to determine which wakeup your callback is being run for.

Implementations

impl Wakeup[src]

pub fn after(duration: Duration) -> Instant[src]

Returns Instant::now() + duration.

pub fn after_millis(millis: u64) -> Instant[src]

The same as Wakeup::after, but constructs a Duration from a number of milliseconds, since Duration methods are so long...

pub fn trigger_after(&mut self, duration: Duration)[src]

Modifies this wakeup to trigger after duration has passed from Instant::now, calculated via Wakeup::after.

Trait Implementations

impl Clone for Wakeup[src]

impl Copy for Wakeup[src]

impl Debug for Wakeup[src]

impl Eq for Wakeup[src]

impl Hash for Wakeup[src]

impl Ord for Wakeup[src]

impl PartialEq<Wakeup> for Wakeup[src]

impl PartialOrd<Wakeup> for Wakeup[src]

impl StructuralEq for Wakeup[src]

impl StructuralPartialEq for Wakeup[src]

Auto Trait Implementations

impl RefUnwindSafe for Wakeup

impl Send for Wakeup

impl Sync for Wakeup

impl Unpin for Wakeup

impl UnwindSafe for Wakeup

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.