Current section
Files
Jump to
Current section
Files
lib/encoder/binary.ex
defmodule PlugSessionRedisStore.Encoder.Binary do
@moduledoc """
Encode and decode erlang term in binary format.
"""
@behaviour PlugSessionRedisStore.Encoder
def encode(term), do: :erlang.term_to_binary(term)
def decode(binary), do: :erlang.binary_to_term(binary)
end