Nebulex.Adapters.Redis.Serializer.Serializable protocol (Nebulex.Adapters.Redis v3.0.0-rc.1)

View Source

Protocol controlling how a key/value is encoded to a string and how a string is decoded into an Elixir any().

See Redis Strings.

Summary

Types

t()

All the types that implement this protocol.

Functions

Decodes data with the given opts.

Encodes data with the given opts.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

decode(data, opts \\ [])

@spec decode(binary(), [any()]) :: any()

Decodes data with the given opts.

encode(data, opts \\ [])

@spec encode(any(), [any()]) :: binary()

Encodes data with the given opts.