Struct airnode_abi::ABI
source · [−]Expand description
Airnode ABI object that can be encoded into the vector of U256 and decoded from it
Fields
version: u8Id of the ABI version. It is always “1” so far
schema: StringSchema string. Each parameter is represented by a char
params: Vec<Param>List of ABI parameters.
Implementations
sourceimpl ABI
impl ABI
sourcepub fn encode(&self) -> Result<Vec<U256>, EncodingError>
pub fn encode(&self) -> Result<Vec<U256>, EncodingError>
encodes ABI into vector or 256 bit values The function can encode up to 31 parameters (and 1 byte is used to encode the encoding version).
sourcepub fn decode_with_schema(
schema: String,
data: &Vec<U256>,
strict: bool
) -> Result<Self, DecodingError>
pub fn decode_with_schema(
schema: String,
data: &Vec<U256>,
strict: bool
) -> Result<Self, DecodingError>
decodes ABI from the vector or 256 bit values. This function can be used when data doesn’t contain schema, but you know it from the other source.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ABI
impl<'de> Deserialize<'de> for ABI
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 ABI
Auto Trait Implementations
impl RefUnwindSafe for ABI
impl Send for ABI
impl Sync for ABI
impl Unpin for ABI
impl UnwindSafe for ABI
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more