pub enum ApplicationErrorCategory {
Show 15 variants
Input,
Authorization,
Contract,
Query,
Module,
Cursor,
Resource,
Storage,
Uncertainty,
Internal,
Protocol,
Command,
Control,
History,
Capacity,
}Expand description
Coarse application failure category.
Variants§
Input
Caller-controlled application input.
Authorization
Authentication, role, or authorization policy.
Contract
Contract selection and compatibility.
Query
RiffQL compilation or execution.
Module
Named-query module selection.
Cursor
Cursor validation.
Resource
Public resource bounds.
Storage
Authoritative storage availability.
Uncertainty
Mutation uncertainty.
Internal
Cancellation, deadline, or redacted defects.
Protocol
Peer protocol conformance.
Command
Symbolic command admission or execution.
Control
Cancellation and deadline control.
History
History incarnation observations.
Capacity
Admission capacity.
Implementations§
Source§impl ApplicationErrorCategory
impl ApplicationErrorCategory
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Returns the stable machine name.
Examples found in repository?
examples/generate_error_registry.rs (line 21)
7fn main() -> io::Result<()> {
8 let mut output = io::BufWriter::new(io::stdout().lock());
9 writeln!(output, "code\tcategory\trecovery_action\tfixes\tmessage")?;
10 for code in riffdb_errors::APPLICATION_ERROR_CODES {
11 let fixes = code
12 .fixes()
13 .iter()
14 .map(|fix| fix.as_str())
15 .collect::<Vec<_>>()
16 .join(",");
17 writeln!(
18 output,
19 "{}\t{}\t{}\t{}\t{}",
20 code.as_str(),
21 code.category().as_str(),
22 code.recovery_action().as_str(),
23 fixes,
24 code.safe_message()
25 )?;
26 }
27 output.flush()
28}Trait Implementations§
Source§impl Clone for ApplicationErrorCategory
impl Clone for ApplicationErrorCategory
impl Copy for ApplicationErrorCategory
Source§impl Debug for ApplicationErrorCategory
impl Debug for ApplicationErrorCategory
impl Eq for ApplicationErrorCategory
Source§impl Hash for ApplicationErrorCategory
impl Hash for ApplicationErrorCategory
Source§impl PartialEq for ApplicationErrorCategory
impl PartialEq for ApplicationErrorCategory
impl StructuralPartialEq for ApplicationErrorCategory
Auto Trait Implementations§
impl Freeze for ApplicationErrorCategory
impl RefUnwindSafe for ApplicationErrorCategory
impl Send for ApplicationErrorCategory
impl Sync for ApplicationErrorCategory
impl Unpin for ApplicationErrorCategory
impl UnsafeUnpin for ApplicationErrorCategory
impl UnwindSafe for ApplicationErrorCategory
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