[−][src]Struct alacritty::scheduler::Scheduler
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]
&mut self,
event_queue: &mut Vec<GlutinEvent<'static, AlacrittyEvent>>
) -> Option<Instant>
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]
&mut self,
event: GlutinEvent<'static, AlacrittyEvent>,
interval: Duration,
repeat: bool,
timer_id: TimerId
)
Schedule a new event.
pub fn unschedule(
&mut self,
id: TimerId
) -> Option<GlutinEvent<'static, AlacrittyEvent>>
[src]
&mut self,
id: TimerId
) -> Option<GlutinEvent<'static, AlacrittyEvent>>
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,