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§
Required Methods§
Sourcefn is_overflow_receive_msg(msg: &Map<String, Value>) -> bool
fn is_overflow_receive_msg(msg: &Map<String, Value>) -> bool
Determine if the value msg
is a valid PacketMetadata
.
Sourcefn strip_middleware_msg(json_obj_memo: Map<String, Value>) -> Map<String, Value>
fn strip_middleware_msg(json_obj_memo: Map<String, Value>) -> Map<String, Value>
Remove this middleware’s entry from the JSON object memo.
Sourcefn overflow_receiver(&self) -> &Self::AccountId
fn overflow_receiver(&self) -> &Self::AccountId
Account that shall receive the funds in case of an overflow.
Sourcefn target_amount(&self) -> &Self::Amount
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.