View Source TypedStructor.Definer.Defstruct (TypedStructor v0.5.0)
A definer to define a struct and a type for a given definition.
Additional options for typed_structor
:define_struct
- iffalse
, the type will be defined, but the struct will not be defined. Defaults totrue
.
Usage
defmodule MyStruct do
use TypedStructor
typed_structor definer: :defstruct, define_struct: false do
field :name, String.t()
field :age, integer()
end
end
Summary
Functions
Defines a struct and a type for a given definition.
Functions
Defines a struct and a type for a given definition.