stella v0.6.0 Struct

Documentation for Struct module.

Link to this section Summary

Functions

Converts nested Struct type element to nested Map type

Link to this section Functions

Specs

to_map() :: %{}

Converts nested Struct type element to nested Map type

Examples

iex> Struct.to_map(%{a: 1, b: 2})
%{a: 1, b: 2}

iex> Struct.to_map(%{a: 1, b: 2})
%{a: 1, b: 2}

iex> Struct.to_map()
%{}

iex> Struct.to_map(nil)
%{}

Specs

to_map(nil | :maps.iterator(any(), any()) | map()) :: map()