Type.PConvertTo protocol (etl_core v0.1.54)

Protocol oriented to the definition of the function to convert from one data type to another

Link to this section Summary

Functions

Converts a value to the equivalent of the defined type

Link to this section Types

@type t() :: term()

Link to this section Functions

Link to this function

convert_to(x, type)

@spec convert_to(t(), atom()) :: any()

Converts a value to the equivalent of the defined type

parameters

Parameters:

-x:t(). Value.

- type: Atom. Data type to convert.

return

Return:

- type()