pub enum KatraError {
InvalidArgument(&'static str),
NotSupported(String),
OutOfBudget {
resource: &'static str,
requested: u64,
available: u64,
},
Io(ErrorKind, String),
Protocol(String),
NotFound(String),
AlreadyExists(String),
Corrupt(String),
Timeout {
what: &'static str,
timeout_ns: u64,
},
Sync(String),
FallbackUnavailable(&'static str),
Internal(&'static str),
}Expand description
The unified Katra error type.
Variants§
InvalidArgument(&'static str)
Invalid argument; the &'static str names the argument.
NotSupported(String)
Operation not supported; the message names the capability.
OutOfBudget
A budget was exceeded.
Fields
Io(ErrorKind, String)
I/O failure.
Protocol(String)
Protocol violation (trace format, ABI framing).
NotFound(String)
Resource not found.
AlreadyExists(String)
Resource already exists.
Corrupt(String)
Corrupt data.
Timeout
Timeout.
Sync(String)
Synchronization invariant violation.
Fallback unavailable.
Internal(&'static str)
Internal invariant violation.
Implementations§
Source§impl KatraError
impl KatraError
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
The coarse category of this error.
Trait Implementations§
Source§impl Clone for KatraError
impl Clone for KatraError
Source§fn clone(&self) -> KatraError
fn clone(&self) -> KatraError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KatraError
impl Debug for KatraError
Source§impl Display for KatraError
impl Display for KatraError
impl Eq for KatraError
Source§impl Error for KatraError
impl Error for KatraError
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 From<Error> for KatraError
impl From<Error> for KatraError
Source§impl PartialEq for KatraError
impl PartialEq for KatraError
impl StructuralPartialEq for KatraError
Auto Trait Implementations§
impl Freeze for KatraError
impl RefUnwindSafe for KatraError
impl Send for KatraError
impl Sync for KatraError
impl Unpin for KatraError
impl UnsafeUnpin for KatraError
impl UnwindSafe for KatraError
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