Struct alloy_sol_types::Panic
source · pub struct Panic {
pub code: U256,
}
Expand description
These are thrown by assert(condition)
and by internal Solidity checks,
such as arithmetic overflow or array bounds checks.
The list of all known panic codes can be found in the PanicKind enum.
Fields§
§code: U256
The Solidity panic code.
Implementations§
Trait Implementations§
source§impl Error for Panic
impl Error for Panic
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl<T> From<Panic> for ContractError<T>
impl<T> From<Panic> for ContractError<T>
source§impl PartialEq for Panic
impl PartialEq for Panic
source§impl SolError for Panic
impl SolError for Panic
§type Parameters<'a> = (Uint<256>,)
type Parameters<'a> = (Uint<256>,)
The underlying tuple type which represents the error’s members. Read more
source§fn new(tuple: <Self::Parameters<'_> as SolType>::RustType) -> Self
fn new(tuple: <Self::Parameters<'_> as SolType>::RustType) -> Self
Convert from the tuple type used for ABI encoding and decoding.
source§fn tokenize(&self) -> Self::Token<'_>
fn tokenize(&self) -> Self::Token<'_>
Convert to the token type used for EIP-712 encoding and decoding.
source§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
The size of the error params when encoded in bytes, without the
selector.
source§fn abi_decode_raw(data: &[u8], validate: bool) -> Result<Self>
fn abi_decode_raw(data: &[u8], validate: bool) -> Result<Self>
ABI decode this call’s arguments from the given slice, without its
selector.
source§fn abi_decode(data: &[u8], validate: bool) -> Result<Self>
fn abi_decode(data: &[u8], validate: bool) -> Result<Self>
ABI decode this error’s arguments from the given slice, with the
selector.
source§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
ABI encode the error to the given buffer without its selector.
source§impl<T> TryFrom<ContractError<T>> for Panic
impl<T> TryFrom<ContractError<T>> for Panic
§type Error = ContractError<T>
type Error = ContractError<T>
The type returned in the event of a conversion error.
impl Copy for Panic
impl Eq for Panic
impl StructuralPartialEq for Panic
Auto Trait Implementations§
impl Freeze for Panic
impl RefUnwindSafe for Panic
impl Send for Panic
impl Sync for Panic
impl Unpin for Panic
impl UnwindSafe for Panic
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Compare self to
key
and return true
if they are equal.