Trait gear_core::message::Packet

source ·
pub trait Packet {
    // Required methods
    fn payload_bytes(&self) -> &[u8] ;
    fn payload_len(&self) -> u32;
    fn gas_limit(&self) -> Option<GasLimit>;
    fn value(&self) -> Value;
    fn kind() -> DispatchKind;
}
Expand description

Message packet.

Provides common behavior for any message’s packet: accessing to payload, gas limit and value.

Required Methods§

source

fn payload_bytes(&self) -> &[u8]

Packet payload bytes.

source

fn payload_len(&self) -> u32

Payload len

source

fn gas_limit(&self) -> Option<GasLimit>

Packet optional gas limit.

source

fn value(&self) -> Value

Packet value.

source

fn kind() -> DispatchKind

A dispatch kind the will be generated from the packet.

Object Safety§

This trait is not object safe.

Implementors§