Attribute Macro ic_cdk_macros::pre_upgrade
source · #[pre_upgrade]
Expand description
Register the canister_pre_upgrade
entry point of a canister.
This attribute macro will export the function canister_pre_upgrade
in the canister module.
The function under this attribute must have no return value.
Each canister can only have one canister_pre_upgrade
entry point.
§Example
#[pre_upgrade]
fn pre_upgrade_function() {
// ...
}