pub enum Kind {
Usage,
Config,
Plugin,
Refused,
Connection,
Auth,
Query,
Delivery,
Internal,
Cancelled,
TimedOut,
}Expand description
What kind of problem a code is.
Variants§
Usage
The command was called wrongly: an unknown selector, a missing argument.
Config
The project’s files are wrong: a bad key, a missing reference.
Plugin
A plugin is missing, can’t be installed, or doesn’t behave.
Refused
DRE refused something unsafe: a statement an unmanaged report may not run.
Connection
A connection couldn’t be made; trying again may work.
Auth
A connection was refused its credentials.
Query
A query failed on the database.
Delivery
An output couldn’t be delivered.
Internal
Something DRE didn’t expect: a file it can’t read, a bug.
Cancelled
The run was cancelled.
TimedOut
The run took longer than its timeout.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn exit_code(self) -> u8
pub fn exit_code(self) -> u8
The exit code a failure of this kind ends a command with when it stops the command from
starting: 2 for a usage, config, plugin or refusal problem (fix it; retrying won’t help),
124 for a timeout, 130 for a cancel, else 1. A failure while a run is under way exits 1
whatever its kind (see dre_core::run::RunSummary::exit_code).
pub fn as_str(self) -> &'static str
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
Source§impl JsonSchema for Kind
impl JsonSchema for Kind
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for Kind
impl Ord for Kind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Kind
impl PartialOrd for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.