#[non_exhaustive]pub enum ErrorCode {
Show 13 variants
InvalidOperator,
InvalidArguments,
VariableNotFound,
InvalidContextLevel,
TypeError,
ArithmeticError,
Custom,
ParseError,
Thrown,
FormatError,
IndexOutOfBounds,
ConfigurationError,
BudgetExceeded,
}Expand description
What kind of error an Error is, without the details:
one variant per ErrorKind variant, Copy, comparable and hashable.
Read it with Error::code.
Every variant exists in every build, whatever features are enabled, and
Self::as_str spells it the way Error::tag
always has, so a host can switch on the code instead of comparing tag
strings, and the bindings carry the same names on the wire.
#[non_exhaustive]: a later release may add kinds, so a match needs
a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidOperator
InvalidArguments
VariableNotFound
InvalidContextLevel
TypeError
ArithmeticError
Custom
ParseError
Thrown
FormatError
IndexOutOfBounds
ConfigurationError
BudgetExceeded
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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