pub struct TimerConfig {
pub cycles: TimerCycles,
pub cycles_count: TimerLoop,
pub handler: Arc<dyn Fn(TimerEvent) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>,
}
Expand description
The timer configuration.
Fields§
§cycles: TimerCycles
The list of custom timer cycles.
cycles_count: TimerLoop
The timer cycles counter.
handler: Arc<dyn Fn(TimerEvent) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>
The timer event handler.
Trait Implementations§
Source§impl Clone for TimerConfig
impl Clone for TimerConfig
Source§fn clone(&self) -> TimerConfig
fn clone(&self) -> TimerConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TimerConfig
impl !RefUnwindSafe for TimerConfig
impl Send for TimerConfig
impl Sync for TimerConfig
impl Unpin for TimerConfig
impl !UnwindSafe for TimerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more