StrawHat v0.1.0 StrawHat.Error.ErrorMetadata View Source

Metadata used on %StrawHat.Error{}. It is a representation of key value pair into %StrawHat.Error.ErrorMetadata{}. Mostly used throw StrawHat.Error.

Link to this section Summary

Types

t()
  • key: Key of the metadata.
  • value: Value of the metadata

Functions

Creates a %ErrorMetadata{}

Creates a %ErrorMetadata{}

Serialize a Keyword list into a list of %ErrorMetadata{}

Link to this section Types

Link to this type t() View Source
t() :: %StrawHat.Error.ErrorMetadata{key: String.t, value: String.t}
  • key: Key of the metadata.
  • value: Value of the metadata.

Link to this section Functions

Link to this function new(value_tuple) View Source
new({String.t | atom, any}) :: t

Creates a %ErrorMetadata{}.

Link to this function new(key, value) View Source
new(atom | String.t, any) :: t

Creates a %ErrorMetadata{}.

Link to this function serialize(metadata) View Source
serialize(Keyword.t) :: [t]

Serialize a Keyword list into a list of %ErrorMetadata{}.