pub trait MessageIdExt: Sealed {
// Required methods
fn generate_from_user(
block_number: u32,
user_id: ProgramId,
local_nonce: u128,
) -> MessageId;
fn generate_outgoing(
origin_msg_id: MessageId,
local_nonce: u32,
) -> MessageId;
fn generate_reply(origin_msg_id: MessageId) -> MessageId;
fn generate_signal(origin_msg_id: MessageId) -> MessageId;
}
Expand description
Message identifier extension.
Required Methods§
Sourcefn generate_from_user(
block_number: u32,
user_id: ProgramId,
local_nonce: u128,
) -> MessageId
fn generate_from_user( block_number: u32, user_id: ProgramId, local_nonce: u128, ) -> MessageId
Generates MessageId
for non-program outgoing message.
Sourcefn generate_outgoing(origin_msg_id: MessageId, local_nonce: u32) -> MessageId
fn generate_outgoing(origin_msg_id: MessageId, local_nonce: u32) -> MessageId
Generates MessageId
for program outgoing message.
Sourcefn generate_reply(origin_msg_id: MessageId) -> MessageId
fn generate_reply(origin_msg_id: MessageId) -> MessageId
Generates MessageId
for reply message depend on status code.
§SAFETY: DO NOT ADJUST REPLY MESSAGE ID GENERATION,
BECAUSE AUTO-REPLY LOGIC DEPENDS ON PRE-DEFINED REPLY ID.
Sourcefn generate_signal(origin_msg_id: MessageId) -> MessageId
fn generate_signal(origin_msg_id: MessageId) -> MessageId
Generates MessageId
for signal message depend on status code.
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.