struct Item
XuAPI
pub struct Item {
}用途
Item 上下文或状态结构体。
公开字段
此类型没有公开字段。
#timer标准库包 `#timer`。
struct Itempub struct Item {
}Item 上下文或状态结构体。
此类型没有公开字段。
struct Wheelpub struct Wheel {
}Wheel 上下文或状态结构体。
此类型没有公开字段。
newpub fn new() Wheel构造该类型的新值。
无需传入参数。
Wheel — 该类型的值
($&Wheel) after_nspub fn (w $&Wheel) after_ns(delay_ns int) int$&Wheel 上的操作:执行 after ns 操作。
w $&WheelWheel 实例;以独占借用传入,方法可修改它,调用方仍持有实例。delay_ns intint — 该类型的值
($&Wheel) every_nspub fn (w $&Wheel) every_ns(period_ns int) int$&Wheel 上的操作:执行 every ns 操作。
w $&WheelWheel 实例;以独占借用传入,方法可修改它,调用方仍持有实例。period_ns intint — 该类型的值
($&Wheel) cancelpub fn (w $&Wheel) cancel(id int) bool$&Wheel 上的操作:取消。
w $&WheelWheel 实例;以独占借用传入,方法可修改它,调用方仍持有实例。id intbool — 是否成立
($&Wheel) try_duepub fn (w $&Wheel) try_due() int$&Wheel 上的操作:执行 try due 操作。
w $&WheelWheel 实例;以独占借用传入,方法可修改它,调用方仍持有实例。int — 该类型的值
($&Wheel) runpub fn (w $&Wheel) run() int$&Wheel 上的操作:运行。
w $&WheelWheel 实例;以独占借用传入,方法可修改它,调用方仍持有实例。int — 该类型的值