View Source Hugs.Sample (hugs v0.2.4)
Link to this section Summary
Functions
Create a new Hugs.Sample
struct from a map or a struct.
Create a new Hugs.Sample
struct from a list of properties.
Link to this section Types
@type as_map() :: %{ ser_map: %{optional(binary()) => integer()}, ser_one: integer(), ser_two: integer(), sub: Hugs.Sample.Sub.t(), sub_map: %{optional(binary()) => Hugs.Sample.Sub.t()} }
@type kv() :: {:ser_map, %{optional(binary()) => integer()}} | {:ser_one, integer()} | {:ser_two, integer()} | {:sub, Hugs.Sample.Sub.t()} | {:sub_map, %{optional(binary()) => Hugs.Sample.Sub.t()}}
@type kvs() :: [kv()]
@type t() :: %Hugs.Sample{ ser_map: %{optional(binary()) => integer()}, ser_one: integer(), ser_two: integer(), sub: Hugs.Sample.Sub.t(), sub_map: %{optional(binary()) => Hugs.Sample.Sub.t()} }
Link to this section Functions
@spec denormalize!(term(), Hugs.Norde.denormalize_opts()) :: t()
@spec denormalize(term(), Hugs.Norde.denormalize_opts()) :: {:ok, t()} | {:error, term()}
Create a new Hugs.Sample
struct from a map or a struct.
Create a new Hugs.Sample
struct from a list of properties.