pub fn certified_data_set<T>(data: T)Expand description
Sets the certified data of this canister.
Canisters can store up to 32 bytes of data that is certified by
the system on a regular basis. One can call data_certificate
function from a query call to get a certificate authenticating the
value set by calling this function.
This function can only be called from the following contexts:
canister_init,canister_pre_upgradeandcanister_post_upgradehooks.canister_updatecalls.- reply or reject callbacks.
§Panics
- This function traps if
data.len() > 32. - This function traps if it’s called from an illegal context (e.g., from a query call).