#[non_exhaustive]pub enum ErrorKind {
InvalidArgument,
FailedPrecondition,
OutOfRange,
Unimplemented,
NotFound,
Internal,
Unknown,
}Expand description
The kind of failure Ink reported.
These mirror the absl::Status codes Ink actually returns. By far the most
common is ErrorKind::InvalidArgument: it covers a brush size that is not
finite and positive, stroke inputs that go backwards in time, and inputs
that disagree about which optional fields they carry.
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.
InvalidArgument
An argument was outside the range Ink accepts.
FailedPrecondition
The object was not in a state where the call made sense, such as updating the shape of a stroke that was never started.
OutOfRange
An index was past the end.
Unimplemented
Something Ink knows about but has not implemented.
NotFound
A lookup found nothing.
Internal
Ink hit an internal inconsistency.
Unknown
Anything else, including a status code this crate does not know yet.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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