Enum TimerQueueError
pub enum TimerQueueError {
Closed,
Busy,
WrongQueue,
WrongOwner,
InvalidTime,
Capacity,
CountOverflow,
KeyExhausted,
Backend(Report<ErrorKind>),
}Expand description
定时来源的有限异常分类;每项操作只使用有意义的子集。
无键(key)的操作不报WrongQueue;共享方法不报WrongOwner;KeyExhausted仅用于
新登记。普通取出中的Busy/Closed用TimerTake正常分支,不再套同名错误。
外层错误不交出批次(batch),也不保证此前没有状态变化;未交出内容仍由来源负责。
Variants§
Closed
来源已停止接收或所需操作已不再开放。
Busy
本次请求/管理访问权暂不可取得。
WrongQueue
键(key)明确属于其它来源。
WrongOwner
本地方法不在合法所属线程(owner thread)/上下文执行。
InvalidTime
时间域、可表示范围或单调推进条件不满足。
Capacity
实现声明的容量限制拒绝。
CountOverflow
逻辑计数将溢出,不允许回绕。
KeyExhausted
新登记不能再取得可靠的独立键(key),不复用身份误命中旧登记。
Backend(Report<ErrorKind>)
原底层错误报告(Report),保留其分类、来源和附件。
Implementations§
Source§impl TimerQueueError
impl TimerQueueError
Sourcepub fn into_report(self) -> Report<ErrorKind>
pub fn into_report(self) -> Report<ErrorKind>
消耗本错误,转换为pi_result统一错误报告(Report)。
Closed/WrongOwner映射InvalidState,Busy映射Busy,
WrongQueue/InvalidTime映射InvalidInput,其余资源分类映射ResourceExhausted。
Backend直接归还原报告,不改上下文或另包一层,不要求报告可克隆(Clone)。
不访问原队列(queue)、内容或时钟;失败诊断可能分配并产生堆栈(backtrace)成本。
Auto Trait Implementations§
impl !RefUnwindSafe for TimerQueueError
impl !UnwindSafe for TimerQueueError
impl Forget for TimerQueueError
impl Freeze for TimerQueueError
impl Move for TimerQueueError
impl Send for TimerQueueError
impl Sync for TimerQueueError
impl Unpin for TimerQueueError
impl UnsafeUnpin for TimerQueueError
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