ExRets v0.1.1 ExRets.CompactDelimiter View Source

A delimiter that separates fields in a compact record.

Link to this section Summary

Types

Raw delimiter value returned as part of a compact response.

t()

Decoded delimiter value.

Functions

Decodes a delimiter value from the octet returned as part of a compact response.

Link to this section Types

Link to this type

octet()

View Source (since 0.1.0)
octet() :: String.t()

Raw delimiter value returned as part of a compact response.

Link to this type

t()

View Source (since 0.1.0)
t() :: String.t()

Decoded delimiter value.

Link to this section Functions

Link to this function

decode(octet)

View Source (since 0.1.0)
decode(octet()) :: {:ok, t()} | :error

Decodes a delimiter value from the octet returned as part of a compact response.

Examples

iex> ExRets.CompactDelimiter.decode("09")
{:ok, "\t"}

iex> ExRets.CompactDelimiter.decode("9")
{:ok, "\t"}

iex> ExRets.CompactDelimiter.decode("invalid")
:error