#[inspect_message]
Expand description

Register the canister_inspect_message entry point of a canister.

This attribute macro will export the function canister_inspect_message in the canister module.

The function under this attribute must have no return value.

Each canister can only have one canister_inspect_message entry point.

Example

#[inspect_message]
fn inspect_message_function() {
    // ...
}

You can specify a guard function to be executed before the inspect_message function. When the guard function returns an error, the inspect_message function will not proceed.

fn guard_function() -> Result<(), String> {
    // ...
}
#[inspect_message(guard = "guard_function")]
fn inspect_message_function() {
    // ...
}