Crate bcdk Copy item path Source api System API and low level functions for it. binary_parser de Deserialize Candid binary format to Rust data structures error candid::Result<T> = Result<T, candid::Error>>
http_gateway pretty pretty printer for Candid type and value ser Serialize a Rust data structure to Candid binary format storage Tools for managing stable storage of data in a canister. types Provides Candid type conversion and serialization. utils Decode Decode Candid message into a tuple of Rust values of the given types.
Produces Err
if the message fails to decode at any given types.
If the message contains only one value, it returns the value directly instead of a tuple. Encode Encode sequence of Rust values into Candid message of type candid::Result<Vec<u8>>
. define_function Define a function reference type. define_service Define a service reference type. eprintln Format and then print the formatted message export_candid export_service field Construct a field type, which can be used in TypeInner::Record
and TypeInner::Variant
. func Construct a function type. println Format and then print the formatted message record Construct a record type, e.g., record!{ label: Nat::ty(); 42: String::ty() }
. service Construct a service type. variant Construct a variant type, e.g., variant!{ tag: <()>::ty() }
. DecoderConfig Config the deserialization quota, used to prevent spending too much time in decoding malicious payload. Func Int Nat Principal Generic ID on Internet Computer. Reserved Service TimerId Type returned by the set_timer
and set_timer_interval
functions. Pass to clear_timer
to remove the timer. TypeEnv Empty Error MotokoResult CandidType Deserialize A data structure that can be deserialized from any data format supported
by Serde. block_on Deprecated See documentation for spawn . call Performs an asynchronous call to another canister. caller Returns the caller of the current call. clear_timer Cancels an existing timer. Does nothing if the timer has already been canceled. decode_args Decode a series of arguments, represented as a tuple. There is a maximum of 16 arguments
supported. decode_args_with_config decode_one Decode a single argument. decode_one_with_config encode_args Serialize an encoding of a tuple to a vector of bytes. encode_one Serialize a single value to a vector of bytes. id Returns the canister id as a blob. notify Like notify_with_payment128 , but sets the payment to zero. print Prints the given message. set_timer Sets func
to be executed later, after delay
. Panics if delay
+ time()
is more than u64::MAX
nanoseconds. set_timer_interval Sets func
to be executed every interval
. Panics if interval
+ time()
is more than u64::MAX
nanoseconds. setup Setup the stdlib hooks. spawn Spawn an asynchronous task that drives the provided future to
completion. trap Traps with the given message. write_args Serialize an encoding of a tuple and write it to a Write
buffer. Result candid_method heartbeat init inspect_message on_low_wasm_memory post_upgrade pre_upgrade query update CandidType Deserialize