KiwiCodec.TransformModule behaviour (kiwi_codec v0.1.0)

Copy Markdown View Source

Hook behaviour for custom Kiwi encode/decode normalization.

A Kiwi module can override transform_module/0 and return a module that implements this behaviour. The transform is called before encoding and after decoding, mirroring the extension point in elixir-protobuf.

Summary

Callbacks

decode(struct, module)

@callback decode(
  struct(),
  module()
) :: struct()

encode(struct, module)

@callback encode(
  struct(),
  module()
) :: struct()