pub struct Timer<T, const N0: usize, const N: usize, const L: usize> { /* private fields */ }
Expand description

可撤销的定时器

Implementations

获得添加任务数量

获得移除任务数量

获得滚动次数

放入一个定时任务

弹出定时间内的一个定时任务

  • @return Option<T> 弹出的定时元素

弹出定时间内的一个关键字和定时任务

  • @return Option<(TimerKey, T)> 弹出的关键字和定时元素

判断指定时间内是否还有定时任务

轮滚动 - 向后滚动一个最小粒度, 可能会造成轮的逐层滚动。如果滚动到底,则修正堆上全部的定时任务,并将堆上的到期任务放入轮中

取消定时任务

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.