pub enum ParamType {
Address,
Bytes,
Int(usize),
Uint(usize),
Bool,
String,
Array(Box<ParamType>),
FixedBytes(usize),
FixedArray(Box<ParamType>, usize),
Tuple(Vec<ParamType>),
}
Expand description
Function and event param types.
Variants§
Address
Address.
Bytes
Bytes.
Int(usize)
Signed integer.
Uint(usize)
Unsigned integer.
Bool
Boolean.
String
String.
Array(Box<ParamType>)
Array of unknown size.
FixedBytes(usize)
Vector of bytes with fixed size.
FixedArray(Box<ParamType>, usize)
Array with fixed size.
Tuple(Vec<ParamType>)
Tuple containing different types
Implementations§
Source§impl ParamType
impl ParamType
Sourcepub fn is_empty_bytes_valid_encoding(&self) -> bool
pub fn is_empty_bytes_valid_encoding(&self) -> bool
returns whether a zero length byte slice (0x
) is
a valid encoded form of this param type
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
returns whether a ParamType is dynamic used to decide how the ParamType should be encoded
Trait Implementations§
Source§impl<'a> Deserialize<'a> for ParamType
impl<'a> Deserialize<'a> for ParamType
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ParamType
Auto Trait Implementations§
impl Freeze for ParamType
impl RefUnwindSafe for ParamType
impl Send for ParamType
impl Sync for ParamType
impl Unpin for ParamType
impl UnwindSafe for ParamType
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