Trait TimerWithContext

Source
pub trait TimerWithContext: Timer {
    type Context;

    // Required method
    fn new_with_context<C>(duration: Duration, context: C) -> Self
       where C: AsMut<Self::Context>;
}
Expand description

Timer service provider trait with more configiration.

Required Associated Types§

Source

type Context

timer extra context parameter.

Required Methods§

Source

fn new_with_context<C>(duration: Duration, context: C) -> Self
where C: AsMut<Self::Context>,

Create new timer with context parameter

§Parameters

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§