pub struct RaisedFault(/* private fields */);Expand description
A FaultKind that is actually a fault.
Fault::set takes one of these, so “raise the absence of a fault” has no
spelling.
The associated constants are the whole raisable set. There is no
RaisedFault(FaultKind::None) to construct — RaisedFault::new is the
only fallible route in, and it is for a kind that arrives as data.
Implementations§
Source§impl RaisedFault
impl RaisedFault
Sourcepub const INT_OVERFLOW: RaisedFault
pub const INT_OVERFLOW: RaisedFault
Integer arithmetic overflowed (§4.12).
Sourcepub const DIV_BY_ZERO: RaisedFault
pub const DIV_BY_ZERO: RaisedFault
Division or remainder by zero (§4.12).
Sourcepub const INDEX_OUT_OF_BOUNDS: RaisedFault
pub const INDEX_OUT_OF_BOUNDS: RaisedFault
A collection index was out of bounds (§9.2).
Sourcepub const PARSE_FAILED: RaisedFault
pub const PARSE_FAILED: RaisedFault
An input parse mismatch (§7.11).
Sourcepub const EMPTY_COLLECTION: RaisedFault
pub const EMPTY_COLLECTION: RaisedFault
An operation required a non-empty collection (§9.2).
Sourcepub const STACK_OVERFLOW: RaisedFault
pub const STACK_OVERFLOW: RaisedFault
Recursion exceeded the depth limit (§9.2, §17.4).
Sourcepub const FLOAT_TO_INT: RaisedFault
pub const FLOAT_TO_INT: RaisedFault
A Float had no exact Int (§4.12).
Sourcepub const INVALID_CHAR: RaisedFault
pub const INVALID_CHAR: RaisedFault
A code point was not a Unicode scalar value (§4.3).
Sourcepub const INVALID_TEXT: RaisedFault
pub const INVALID_TEXT: RaisedFault
A byte buffer that had to be Text was not valid UTF-8 (§4.3).
Sourcepub const INVALID_SIZE: RaisedFault
pub const INVALID_SIZE: RaisedFault
A size or extent the runtime cannot honour (§9.2).
Sourcepub const TYPE_MISMATCH: RaisedFault
pub const TYPE_MISMATCH: RaisedFault
A value did not have the type its destination declared (§9.2).
Sourcepub const PANIC: RaisedFault
pub const PANIC: RaisedFault
The program called panic(value) (§9.1).
Sourcepub const ASSERT_FAILED: RaisedFault
pub const ASSERT_FAILED: RaisedFault
An assert(condition) found its condition false (§9.1).
Sourcepub const EMPTY_RANGE: RaisedFault
pub const EMPTY_RANGE: RaisedFault
A range with no members was asked for a member (ADR-058).
Sourcepub const NO_ANSWER: RaisedFault
pub const NO_ANSWER: RaisedFault
An argument this algorithm has no answer for (ADR-060).
Sourcepub const fn new(kind: FaultKind) -> Option<RaisedFault>
pub const fn new(kind: FaultKind) -> Option<RaisedFault>
The raisable fault kind names, or None for FaultKind::None —
which is the absence of a fault and cannot be raised.
Trait Implementations§
Source§impl Clone for RaisedFault
impl Clone for RaisedFault
Source§fn clone(&self) -> RaisedFault
fn clone(&self) -> RaisedFault
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more