Trait RuntimeBinder

Source
pub trait RuntimeBinder {
    // Required methods
    fn to_runtime_type(&mut self, type: &Type) -> Result<Option<&str>, Error>;
    fn get(&mut self, name: &str) -> Result<&str, Error>;
}
Expand description

Binder for mapping contract type system to target programming language runtime type system.

Required Methods§

Source

fn to_runtime_type(&mut self, type: &Type) -> Result<Option<&str>, Error>

Convert contract abi type to runtime type string

If the parameter type is tuple or array of tuple returns None

Source

fn get(&mut self, name: &str) -> Result<&str, Error>

Get runtime type by metadata name, If not found the implementation must return [Err(BindError::UnknownType)]

Implementors§