Skip to main content

TimerQueueError

Enum TimerQueueError 

pub enum TimerQueueError {
    Closed,
    Busy,
    WrongQueue,
    WrongOwner,
    InvalidTime,
    Capacity,
    CountOverflow,
    KeyExhausted,
    Backend(Error),
}
Expand description

定时来源的有限异常分类;每项操作只使用有意义的子集。

无键(key)的操作不报WrongQueue;共享方法不报WrongOwner;KeyExhausted仅用于 新登记。普通取出中的Busy/Closed用TimerTake正常分支,不再套同名错误。 外层错误不交出批次(batch),也不保证此前没有状态变化;未交出内容仍由来源负责。

Variants§

§

Closed

来源已停止接收或所需操作已不再开放。

§

Busy

本次请求/管理访问权暂不可取得。

§

WrongQueue

键(key)明确属于其它来源。

§

WrongOwner

本地方法不在合法所属线程(owner thread)/上下文执行。

§

InvalidTime

时间域、可表示范围或单调推进条件不满足。

§

Capacity

实现声明的容量限制拒绝。

§

CountOverflow

逻辑计数将溢出,不允许回绕。

§

KeyExhausted

新登记不能再取得可靠的独立键(key),不复用身份误命中旧登记。

§

Backend(Error)

原底层错误报告(Report),保留其分类、来源和附件。

Implementations§

§

impl TimerQueueError

pub fn into_report(self) -> Error

消耗本错误,转换为pi_result统一错误报告(Report)。

Closed/WrongOwner映射InvalidState,Busy映射Busy, WrongQueue/InvalidTime映射InvalidInput,其余资源分类映射ResourceExhausted。 Backend直接归还原报告,不改上下文或另包一层,不要求报告可克隆(Clone)。 不访问原队列(queue)、内容或时钟;失败诊断可能分配并产生堆栈(backtrace)成本。 此转换的非后端分支仍是未实现占位(unimplemented stub),调用会触发恐慌(panic)。

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OpaqueAttachment for T
where T: Send + Sync + 'static,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.