You can define Structs by using the defstruct. Here is how you can do it:

Example

                                        

iex> defmodule User do
...> defstruct name: "John", age: 27
...> end
iex> defmodule User do
...> defstruct name: "John", age: 27
...> end

Suggest An Answer

No suggestions avaliable!