Module attributes

  1. As annotations
  2. As constants
  3. As temporary storage

Module attributes in Elixir serve three purposes:

  1. They serve to annotate the module, often with information to be used by the user or the VM.
  2. They work as constants.
  3. They work as a temporary module storage to be used during compilation.

Let’s check each case, one by one.