Trait gear_core::ids::prelude::MessageIdExt
source · 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.
Object Safety§
This trait is not object safe.