pub struct OpError {
pub kind: OpErrorKind,
pub reason: &'static str,
pub detail: String,
}Expand description
Op invocation failure detail. Surfaced by the engine when
dispatch_atomic returns Err or the dispatch table lookup
misses. Three-field shape: kind is a stable categorical label,
reason is a &'static str (e.g. "blocklisted", "cooldown")
callers can match on, detail is a free-form human-readable
description.
Fields§
§kind: OpErrorKindCategorical kind. Default Other.
reason: &'static strStable diagnostic label (e.g. "blocklisted", "cooldown",
"nak") consumers match on. Default "".
detail: StringHuman-readable failure detail.
Trait Implementations§
Source§impl Error for OpError
impl Error for OpError
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()
Auto Trait Implementations§
impl Freeze for OpError
impl RefUnwindSafe for OpError
impl Send for OpError
impl Sync for OpError
impl Unpin for OpError
impl UnsafeUnpin for OpError
impl UnwindSafe for OpError
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