Gel.Protocol.CustomCodec behaviour (Gel v0.9.0)

View Source

Behaviour for custom scalar codecs.

See custom codecs development guide on hex.pm for more information.

Summary

Callbacks

Get name for type that can be decoded by codec.

Initialize custom codec.

Callbacks

name()

(since 0.2.0)
@callback name() :: String.t()

Get name for type that can be decoded by codec.

new()

(since 0.2.0)
@callback new() :: Gel.Protocol.Codec.t()

Initialize custom codec.