pub struct Error(/* private fields */);Expand description
Lightweight error type wrapping an i32 error code.
This type is designed for no_std environments and minimal overhead.
Contracts return error codes to the runtime, which propagates them to clients.
§Error Code Ranges
0: Success (OK)1-9: Core SDK errors10-19: ABI/calldata errors20-29: Codec/serialization errors30-39: Storage errors40-49: Validation errors (require)100+: Contract-specific errors
Implementations§
Trait Implementations§
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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