ToonEx.ToonImplHelper (toon_ex v1.1.0)

Copy Markdown View Source

Summary

Functions

Macro to generate simple implementation of protocol. Support for easy to use with ToonEx.Encoder.

Functions

__using__(opts)

(macro)

Macro to generate simple implementation of protocol. Support for easy to use with ToonEx.Encoder.

Utility macro to generate implementation for ToonEx.Encoder.

The target struct must have encode! function for real encoding struct data to TOON in module.

Usage:

use ToonEx.ToonImplHelper, impl: [AModule1, AModule2, ...]

Using macro without option in use keyword. Target module must have encode! function Generate implementation for ToonEx.Encoder like this:

gen_impl AModule

gen_impl(mod)

(macro)