Trait PacketMetadata

Source
pub trait PacketMetadata {
    type AccountId: Display + Into<Signer>;
    type Amount: Copy + Display + Into<Amount>;

    // Required methods
    fn is_overflow_receive_msg(msg: &Map<String, Value>) -> bool;
    fn strip_middleware_msg(
        json_obj_memo: Map<String, Value>,
    ) -> Map<String, Value>;
    fn overflow_receiver(&self) -> &Self::AccountId;
    fn target_amount(&self) -> &Self::Amount;
}
Expand description

Metadata included in ICS-20 packet memos, related with the overflow receive middleware.

Required Associated Types§

Source

type AccountId: Display + Into<Signer>

Account identifier.

Source

type Amount: Copy + Display + Into<Amount>

Amount type.

Required Methods§

Source

fn is_overflow_receive_msg(msg: &Map<String, Value>) -> bool

Determine if the value msg is a valid PacketMetadata.

Source

fn strip_middleware_msg(json_obj_memo: Map<String, Value>) -> Map<String, Value>

Remove this middleware’s entry from the JSON object memo.

Source

fn overflow_receiver(&self) -> &Self::AccountId

Account that shall receive the funds in case of an overflow.

Source

fn target_amount(&self) -> &Self::Amount

The target amount that the original receiver will receive.

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§