#[non_exhaustive]pub enum ErrorCode {
Io,
Malformed,
Unsupported,
LimitExceeded,
InvalidArgument,
Graph,
}Expand description
A stable, machine-readable error classification.
Codes are part of the public API and follow semver: a code is never
removed or repurposed, and host bindings may expose them directly. New
codes may be added in minor releases, hence #[non_exhaustive].
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.
Io
Reading from a source or writing to a sink failed.
Malformed
The input bytes are not valid for the format they claim to be.
Unsupported
The format or feature is recognized but not implemented.
LimitExceeded
A configured safety limit was exceeded (SPEC §Safety).
InvalidArgument
A caller-supplied argument is invalid (e.g. a zero-width crop).
Graph
The op graph is not evaluable as constructed.
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