NotLoaded v0.1.0 NotLoaded View Source

Struct returned by fields when they have not been loaded.

Example

defmodule Book do
   import NotLoaded, only: [lazy_loaded: 1]

  defstruct [
     :title,
      lazy_loaded(:author)
   ]
 end

Link to this section Summary

Functions

Defaults a struct field to NotLoaded

Link to this section Types

Link to this section Functions

Link to this macro lazy_loaded(field_name) View Source (macro)

Defaults a struct field to NotLoaded.