Skip to main content

Crate wasm_dbms_macros

Crate wasm_dbms_macros 

Source
Expand description

Runtime-agnostic procedural macros for the wasm-dbms DBMS engine.

This crate provides procedural macros to automatically implement traits required by the wasm-dbms engine.

§Provided Derive Macros

  • Encode: Automatically implements the Encode trait for structs.
  • Table: Automatically implements the TableSchema trait and associated types.
  • DatabaseSchema: Generates DatabaseSchema<M> trait dispatch and register_tables.
  • CustomDataType: Bridge user-defined types into the Value system.

Derive Macros§

CustomDataType
Derives the CustomDataType trait and an impl From<T> for Value conversion for a user-defined enum or struct.
DatabaseSchema
Generates a DatabaseSchema implementation that dispatches generic DBMS operations to the correct concrete table types.
Encode
Automatically implements the Encode trait for a struct.
Table
Given a struct representing a database table, automatically implements the TableSchema trait with all the necessary types to work with the wasm-dbms engine. So given this struct: