An Elixir behaviour is a list of functions a module is expected to implement.
A behaviour module is a bit like an abstract base class.
Use
@callback
to declare a function that must be defined.Behaviours can have a mix of callbacks and implemented functions.
@callback
declares the parameters and the return type.Behaviours document and enforce the public functions that must be implemented.
All notes and comments are my own opinion. Follow me at @rgacote@genserver.social