pub enum AskError {
Timeout {
target: String,
pending: u64,
},
TargetGone {
target: String,
},
UnknownService {
service: String,
},
InvalidPayload {
target: String,
},
BusStopped,
}Expand description
请求应答(ask/ask_service)错误。
Variants§
Timeout
目标 worker 未能在时限内回包(目标慢/挂/积压)。
0.5.0 带 pending = 超时那一刻目标邮箱里排了多少帧(目标已摘 → 0)。
目的:把“慢“从猜测变成读数 —— 消费侧能显示「积压 N 帧、刷新滞后 ~X 秒」,
而不是只剩一个干巴巴的超时。
TargetGone
目标不存在/未 Running/已被检疫或移除(尽力而为的预检 + 断连快失败)。
UnknownService
请求的服务在全宿主中无人声明(find_service 无提供方)。
InvalidPayload
回包/请求契约不匹配(错型信封,或 B 明确回 Err(InvalidPayload))。
BusStopped
总线已停(put 失败)。
Trait Implementations§
impl Eq for AskError
Source§impl Error for AskError
impl Error for AskError
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()
impl StructuralPartialEq for AskError
Auto Trait Implementations§
impl Freeze for AskError
impl RefUnwindSafe for AskError
impl Send for AskError
impl Sync for AskError
impl Unpin for AskError
impl UnsafeUnpin for AskError
impl UnwindSafe for AskError
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