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

View Source

A Serializer encodes keys and values sent to Redis, and decodes keys and values in the command output.

See Redis Strings.

Summary

Callbacks

Decodes key with the given opts.

Decodes value with the given opts.

Encodes key with the given opts.

Encodes value with the given opts.

Callbacks

decode_key(key, opts)

@callback decode_key(key :: binary(), opts :: [any()]) :: any()

Decodes key with the given opts.

decode_value(value, opts)

@callback decode_value(value :: binary(), opts :: [any()]) :: any()

Decodes value with the given opts.

encode_key(key, opts)

@callback encode_key(key :: any(), opts :: [any()]) :: iodata()

Encodes key with the given opts.

encode_value(value, opts)

@callback encode_value(value :: any(), opts :: [any()]) :: iodata()

Encodes value with the given opts.