[][src]Trait kompact::Timer

pub trait Timer<C: ComponentDefinition> {
    fn schedule_once<F>(
        &mut self,
        timeout: Duration,
        action: F
    ) -> ScheduledTimer
    where
        F: FnOnce(&mut C, Uuid) + Send + 'static
;
fn schedule_periodic<F>(
        &mut self,
        delay: Duration,
        period: Duration,
        action: F
    ) -> ScheduledTimer
    where
        F: Fn(&mut C, Uuid) + Send + 'static
;
fn cancel_timer(&mut self, handle: ScheduledTimer); }

Required methods

fn schedule_once<F>(&mut self, timeout: Duration, action: F) -> ScheduledTimer where
    F: FnOnce(&mut C, Uuid) + Send + 'static, 

fn schedule_periodic<F>(
    &mut self,
    delay: Duration,
    period: Duration,
    action: F
) -> ScheduledTimer where
    F: Fn(&mut C, Uuid) + Send + 'static, 

fn cancel_timer(&mut self, handle: ScheduledTimer)

Loading content...

Implementors

impl<CD> Timer<CD> for CD where
    CD: ComponentDefinition + 'static, 
[src]

Loading content...