Function gstd::exec::exit

source ·
pub fn exit(inheritor_id: ActorId) -> !
Expand description

Terminate the execution of a program.

The program and all corresponding data are removed from the storage. It may be called in the init method as well. One can consider this function as some analog of std::process::exit.

inheritor_id specifies the address to which all available program value should be transferred.


Terminate the program and transfer the available value to the message sender:

use gstd::{exec, msg};

extern "C" fn handle() {
    // ...