pub enum TaskType {
OneShot,
Periodic {
interval: Duration,
buffer_size: Option<NonZeroUsize>,
},
}Expand description
Task type enum to distinguish between one-shot and periodic timers
任务类型枚举,用于区分一次性和周期性定时器
Variants§
OneShot
One-shot timer: executes once and completes
一次性定时器:执行一次后完成
Periodic
Periodic timer: repeats at fixed intervals
周期性定时器:按固定间隔重复执行
Fields
§
buffer_size: Option<NonZeroUsize>Maximum number of pending Called notifications; None is unbounded
待消费 Called 通知的最大数量;None 表示无界
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskType
impl RefUnwindSafe for TaskType
impl Send for TaskType
impl Sync for TaskType
impl Unpin for TaskType
impl UnsafeUnpin for TaskType
impl UnwindSafe for TaskType
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