Attribute Macro ic_cdk::post_upgrade

source ·
#[post_upgrade]
Expand description

Register the canister_post_upgrade entry point of a canister.

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

The function under this attribute must have no return value.

Each canister can only have one canister_post_upgrade entry point.

§Example

#[post_upgrade]
fn post_upgrade_function() {
    // ...
}