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§
Sourcefn payload_bytes(&self) -> &[u8]
fn payload_bytes(&self) -> &[u8]
Packet payload bytes.
Sourcefn payload_len(&self) -> u32
fn payload_len(&self) -> u32
Payload len
Sourcefn kind() -> DispatchKind
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", so this trait is not object safe.