pub enum TaskType {
OneShot,
Periodic {
interval: Duration,
buffer_size: NonZeroU16,
},
}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: NonZeroU16Buffer size for periodic task completion notifier
周期性任务完成通知器的缓冲区大小
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 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