Enum airnode_abi::Param
source · [−]pub enum Param {
Address {
name: String,
value: H160,
},
Bool {
name: String,
value: bool,
},
Bytes {
name: String,
value: Vec<u8>,
},
Bytes32 {
name: String,
value: U256,
},
Date {
name: String,
year: i32,
month: u32,
day: u32,
},
Int256 {
name: String,
value: U256,
sign: i32,
},
String {
name: String,
value: String,
},
String32 {
name: String,
value: String,
},
Uint256 {
name: String,
value: U256,
},
}Expand description
Atomic parameter in the Airnode ABI
Variants
Address
parameter that embeds EVM address (160 bits, H160)
Bool
(non-strict) parameter that embeds boolean value, stored as single Bytes32 value, encoded as bytes of “true” or “false” string
Bytes
parameter that embeds array of bytes (dynamic size)
Bytes32
parameter that embeds single 256 bits value
Date
(non-strict) parameter that embeds date value, stored as single Bytes32 value, encoded as bytes ISO-8601 string
Int256
parameter that embeds signed 256 bits value (there is no type of I256 in Ethereum primitives)
String
parameter that embeds UTF-8 string (dynamic size)
String32
(non-strict) parameter that embeds string as single Bytes32 value. The length of the string should not exceed 32 bytes it will be decoded correctly if this is non-empty valid Utf-8 string
Uint256
parameter that embeds unsigned 256 bits value
Implementations
sourceimpl Param
impl Param
sourcepub fn get_value(&self) -> String
pub fn get_value(&self) -> String
returns value of the parameter as string (for debugging purposes only)
sourcepub fn get_char(&self) -> char
pub fn get_char(&self) -> char
returns character of the parameter for encoding
- Upper case letters refer to dynamically sized types
- Lower case letters refer to statically sized types
- String32 is encoded into Bytes32 in solidity
sourcepub fn is_fixed_size(&self) -> bool
pub fn is_fixed_size(&self) -> bool
returns whether the size of the parameter value is fixed
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Param
impl<'de> Deserialize<'de> for Param
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Param
Auto Trait Implementations
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnwindSafe for Param
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more