Enum StorageError
pub enum StorageError {
Database(DatabaseError),
InvalidLayout {
slot: Uint<256, 4>,
reason: &'static str,
},
Invariant(&'static str),
}Expand description
Errors raised by the arb-storage layer.
Database(...) is an infrastructure failure that must abort the calling
block. The remaining variants signal that the stored bytes do not match
the layout the type expects, which indicates either corrupted state or a
version skew between layout code and on-chain data; both abort the block.
Variants§
Database(DatabaseError)
The underlying state database returned an error.
InvalidLayout
A stored value violated the layout invariants of its typed wrapper (e.g. an address slot whose upper 12 bytes are non-zero).
Fields
§
slot: Uint<256, 4>The slot whose layout is invalid.
Invariant(&'static str)
A storage container detected a broken structural invariant (e.g. a
queue read past next_put).
Trait Implementations§
§impl Clone for StorageError
impl Clone for StorageError
§fn clone(&self) -> StorageError
fn clone(&self) -> StorageError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for StorageError
impl Debug for StorageError
§impl Display for StorageError
impl Display for StorageError
§impl Error for StorageError
impl Error for StorageError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl From<DatabaseError> for StorageError
impl From<DatabaseError> for StorageError
§fn from(source: DatabaseError) -> StorageError
fn from(source: DatabaseError) -> StorageError
Converts to this type from the input type.
Source§impl From<StorageError> for ArbError
impl From<StorageError> for ArbError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StorageError
impl !RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl !UnwindSafe for StorageError
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