Type.PTypeOf protocol (etl_core v0.1.54)

Protocol oriented to determine the data type of an object

Link to this section Summary

Functions

Determine the type of data

Link to this section Types

@type t() :: term()

Link to this section Functions

Determine the type of data

parameter

Parameter:

- data. t(): Data.

return

Return:

- Atom.

examples

Examples:

iex> Type.type_of(1)
:integer

iex> Type.type_of(%{hello: "world"})
:map

iex> tmp = "string"
iex> Type.type_of(tmp)
:binary