View Source Xod.Map (Xod v0.1.0)

Link to this section Summary

Link to this section Types

@type foreign_keys() :: :strip | :strict | :passthrough | Xod.Schema.t()
@type t() :: %Xod.Map{
  coerce: boolean(),
  foreign_keys: foreign_keys(),
  key_coerce: boolean(),
  keyval: %{optional(term()) => Xod.Schema.t()},
  struct: module() | struct()
}

Link to this section Functions

Link to this function

check_all(schema, check)

View Source
@spec check_all(t(), Xod.Schema.t()) :: t()
@spec new(%{optional(term()) => Xod.Schema.t()},
  foreign_keys: foreign_keys(),
  coerce: boolean(),
  key_coerce: boolean(),
  struct: module() | struct()
) :: %Xod.Map{
  coerce: term(),
  foreign_keys: term(),
  key_coerce: term(),
  keyval: term(),
  struct: term()
}
@spec shape(t()) :: %{optional(term()) => Xod.Schema.t()}