Skip to main content

Crate bity_ic_candid_gen

Crate bity_ic_candid_gen 

Source
Expand description

Procedural macros for generating Candid method implementations.

This module provides procedural macros to generate boilerplate code for Candid method implementations in Internet Computer canisters. It supports both query and update methods, with and without arguments.

§Features

  • Generation of Candid method implementations
  • Support for query and update methods
  • Support for methods with and without arguments
  • Automatic type generation for Args and Response

§Examples

use bity_ic_candid_gen::*;

// Generate a method with arguments
generate_candid_method!(my_canister, transfer, update);

// Generate a method without arguments
generate_candid_method_no_args!(my_canister, get_balance, query);

Macros§

generate_candid_method
Generates a Candid method implementation with arguments.
generate_candid_method_no_args
Generates a Candid method implementation without arguments.