Trait TransactionDecodable

Source
pub trait TransactionDecodable {
    // Required methods
    fn decode_call(call: &[u8]) -> Option<Box<Self>>;
    fn decode_hex_call(call: &str) -> Option<Box<Self>>;
    fn decode_call_data(call_data: &[u8]) -> Option<Box<Self>>;
    fn decode_hex_transaction(transaction: &str) -> Option<Box<Self>>;
    fn decode_transaction(transaction: &[u8]) -> Option<Box<Self>>;
}

Required Methods§

Source

fn decode_call(call: &[u8]) -> Option<Box<Self>>

Decodes the SCALE encoded Transaction Call

If you need to decode hex string call decode_hex_call

Source

fn decode_hex_call(call: &str) -> Option<Box<Self>>

Decodes the Hex and SCALE encoded Transaction Call This is equal to Hex::decode + Self::decode_call

If you need to decode bytes call decode_call

Source

fn decode_call_data(call_data: &[u8]) -> Option<Box<Self>>

Decodes only the SCALE encoded Transaction Call Data

Source

fn decode_hex_transaction(transaction: &str) -> Option<Box<Self>>

Decodes the whole Hex and SCALE encoded Transaction. This is equal to Hex::decode + OpaqueTransaction::try_from + Self::decode_call

If you need to decode bytes call decode_transaction

Source

fn decode_transaction(transaction: &[u8]) -> Option<Box<Self>>

Decodes the whole SCALE encoded Transaction. This is equal to OpaqueTransaction::try_from + Self::decode_call

If you need to decode Hex string call decode_hex_transaction

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§