NLdoc.Util.State (NLdoc.Util v1.0.7)

View Source

This module defines a macro for defining a struct that captures the state during a conversion.

Usage

module State do
  use NLdoc.Util.State

  schema do
    field :example, String.t(), default: "Hello"
    field :foo, integer() | nil # Infers has default `nil`
    field :bar, [String.t() | integer()] # Infers has default `[]`
  end
end

Summary

Functions

field(_, _)

field(_, _, _)

schema(list)

(macro)