#[non_exhaustive]pub enum ErrorCode {
NotFound,
Invalid,
Corrupt,
Closed,
Contention,
Rejected,
Unsupported,
Storage,
}Expand description
The contract’s error codes (docs/backend-contract.md, “Error codes”).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
not_found: a direct lookup found nothing.
Invalid
invalid: a caller-supplied value or transition breaks the contract.
Corrupt
corrupt: durable bytes, rows or events are malformed or inconsistent.
Closed
closed: the backend was closed.
Contention
contention: a compare-and-set failed, or another writer holds the log.
Rejected
rejected: a witness or offline verification permanently rejected a
response. Storage operations never return it.
Unsupported
unsupported: the store does not offer this operation.
Storage
Rust only: an I/O or database-driver failure the contract does not classify (a lost connection, a permission error). Go and TypeScript surface these as their platform’s own errors, which carry no CLL code; Rust gives every error a code, so they carry this one.
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Forget for ErrorCode
impl Freeze for ErrorCode
impl Move 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
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> 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.