View Source EctoIPRange.IP4 (Ecto IP Range v0.2.0)

Struct for PostgreSQL :ip4 fields.

Usage

When used during a changeset cast the following values are accepted:

  • :inet.ip4_address(): an IP4 tuple, e.g. {127, 0, 0, 1}
  • binary: binary representation, e.g. "127.0.0.1"
  • EctoIPRange.IP4.t(): a pre-casted struct

Fields

  • ip

Link to this section Summary

Functions

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Link to this section Types

Specs

t() :: %EctoIPRange.IP4{ip: :inet.ip4_address()}

Link to this section Functions

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.