[][src]Struct alacritty::scheduler::Scheduler

pub struct Scheduler {
    timers: VecDeque<Timer>,
}

Scheduler tracking all pending timers.

Fields

timers: VecDeque<Timer>

Implementations

impl Scheduler[src]

pub fn new() -> Self[src]

pub fn update(
    &mut self,
    event_queue: &mut Vec<GlutinEvent<'static, AlacrittyEvent>>
) -> Option<Instant>
[src]

Process all pending timers.

If there are still timers pending after all ready events have been processed, the closest pending deadline will be returned.

pub fn schedule(
    &mut self,
    event: GlutinEvent<'static, AlacrittyEvent>,
    interval: Duration,
    repeat: bool,
    timer_id: TimerId
)
[src]

Schedule a new event.

pub fn unschedule(
    &mut self,
    id: TimerId
) -> Option<GlutinEvent<'static, AlacrittyEvent>>
[src]

Cancel a scheduled event.

pub fn scheduled(&mut self, id: TimerId) -> bool[src]

Check if a timer is already scheduled.

pub fn get_mut(&mut self, id: TimerId) -> Option<&mut Timer>[src]

Access a staged event by ID.

Trait Implementations

impl Default for Scheduler[src]

Auto Trait Implementations

impl !RefUnwindSafe for Scheduler

impl Send for Scheduler

impl Sync for Scheduler

impl Unpin for Scheduler

impl !UnwindSafe for Scheduler

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, 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.