Skip to main content

Packet

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§