Expand description
Macros and derive for ic-dbms-canister
This crate provides procedural macros to automatically implement traits
required by the ic-dbms-canister.
§Provided Derive Macros
Encode: Automatically implements theEncodetrait for structs.Table: Automatically implements theTableSchematrait and associated types.DatabaseSchema: GeneratesDatabaseSchema<M>trait dispatch andregister_tables.DbmsCanister: Automatically implements the API for the ic-dbms-canister.
Derive Macros§
- Custom
Data Type - Derives the
CustomDataTypetrait and animpl From<T> for Valueconversion for a user-defined enum or struct. - Database
Schema - Generates a
DatabaseSchemaimplementation for IC canister crates. - Dbms
Canister - Automatically implements the api for the ic-dbms-canister with all the required methods to interact with the ACL and the defined tables.
- Encode
- Automatically implements the
Encodetrait for a struct. - Table
- Given a struct representing a database table, automatically implements
the
TableSchematrait with all the necessary types to work with the ic-dbms-canister. So given this struct: