xema v0.1.1 Xema.Float View Source

This module contains the struct for the keywords of type float.

Usually this struct will be just used by xema.

Examples

iex> import Xema
Xema
iex> schema = xema :float
%Xema{type: %Xema.Float{}}
iex> schema.type == %Xema.Float{}
true

Link to this section Summary

Types

t()

The struct contains the keywords for the type float

Link to this section Types

Link to this type t() View Source
t() :: %Xema.Float{as: atom(), enum: list() | nil, exclusive_maximum: boolean() | nil, exclusive_minimum: boolean() | nil, maximum: integer() | nil, minimum: integer() | nil, multiple_of: number() | nil}

The struct contains the keywords for the type float.

  • as is used in an error report. Default of as is :float
  • enum specifies an enumeration
  • exclusive_maximum is a boolean. When true, it indicates that the range excludes the maximum value.
  • exclusive_minimum is a boolean. When true, it indicates that the range excludes the minimum value.
  • maximum the maximum value
  • minimum the minimum value
  • multiple_of is a number greater 0. The value has to be a multiple of this number.