pub enum TimerError {
InvalidSlotCount {
slot_count: usize,
reason: &'static str,
},
InvalidConfiguration {
field: String,
reason: String,
},
RegisterFailed,
Shutdown,
WrongWheel,
BatchLengthMismatch {
handles_len: usize,
tasks_len: usize,
},
}Expand description
Timer Error Type
定时器错误类型
Variants§
InvalidSlotCount
Invalid slot count (must be a power of 2 and greater than 0)
无效的槽位数 (必须是 2 的幂且大于 0)
InvalidConfiguration
Configuration validation failed
配置验证失败
RegisterFailed
Registration failed, internal channel is full or closed
注册失败,内部通道已满或已关闭
Shutdown
The timing wheel has been shut down and cannot accept new tasks
时间轮已关闭,不能再接受新任务
WrongWheel
A task handle or task ID belongs to another timing wheel
任务句柄或任务 ID 属于另一个时间轮
BatchLengthMismatch
Batch operation failed: handles and tasks length mismatch
批量操作失败:handles 和 tasks 长度不匹配
Trait Implementations§
Source§impl Clone for TimerError
impl Clone for TimerError
Source§impl Debug for TimerError
impl Debug for TimerError
Source§impl Display for TimerError
impl Display for TimerError
impl Eq for TimerError
Source§impl Error for TimerError
impl Error for TimerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TimerError
impl PartialEq for TimerError
impl StructuralPartialEq for TimerError
Auto Trait Implementations§
impl Freeze for TimerError
impl RefUnwindSafe for TimerError
impl Send for TimerError
impl Sync for TimerError
impl Unpin for TimerError
impl UnsafeUnpin for TimerError
impl UnwindSafe for TimerError
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