Enum airnode_abi::Param[][src]

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)

Fields of Address

name: Stringvalue: H160
Bool

(non-strict) parameter that embeds boolean value, stored as single Bytes32 value, encoded as bytes of “true” or “false” string

Fields of Bool

name: Stringvalue: bool
Bytes

parameter that embeds array of bytes (dynamic size)

Fields of Bytes

name: Stringvalue: Vec<u8>
Bytes32

parameter that embeds single 256 bits value

Fields of Bytes32

name: Stringvalue: U256
Date

(non-strict) parameter that embeds date value, stored as single Bytes32 value, encoded as bytes ISO-8601 string

Fields of Date

name: Stringyear: i32month: u32day: u32
Int256

parameter that embeds signed 256 bits value (there is no type of I256 in Ethereum primitives)

Fields of Int256

name: Stringvalue: U256sign: i32
String

parameter that embeds UTF-8 string (dynamic size)

Fields of String

name: Stringvalue: String
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

Fields of String32

name: Stringvalue: String
Uint256

parameter that embeds unsigned 256 bits value

Fields of Uint256

name: Stringvalue: U256

Implementations

returns name of the parameter

returns value of the parameter as string (for debugging purposes only)

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

returns whether the size of the parameter value is fixed

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.