Function gcore::msg::reply_to

source ·
pub fn reply_to() -> Result<MessageId>
Expand description

Get an identifier of the initial message on which the current handle_reply function is called.

The Gear program processes the reply to the message using the handle_reply function. Therefore, a program should call this function to obtain the original message identifier on which the reply has been posted.

§Examples

use gcore::msg;

#[no_mangle]
extern "C" fn handle_reply() {
    let original_message_id = msg::reply_to().unwrap();
}