Trait ic_kit_runtime::canister::CanisterMethod
source · [−]pub trait CanisterMethod {
const EXPORT_NAME: &'static str;
fn exported_method();
}
Expand description
A method exported by the canister.
Required Associated Constants
sourceconst EXPORT_NAME: &'static str
const EXPORT_NAME: &'static str
The export name of this method, this is the name that the method is exported by in the WASM binary, examples could be:
canister_init
canister_update increment
canister_pre_upgrade
See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#entry-points
Required Methods
The method which is exported by the canister in the WASM, since the entry points
should have a type () -> ()
, we wrap the canister methods in a function in which
we perform the serialization/deserialization of arguments/responses, using the runtime
primitives.