kvasir v0.0.4 Kvasir.Key behaviour View Source

Link to this section Summary

Link to this section Callbacks

Link to this callback

describe(value)

View Source
describe(value :: term()) :: String.t()

Key documentation.

Link to this callback

dump(value)

View Source
dump(value :: term()) :: {:ok, term()} | {:error, atom()}
Link to this callback

dump(value, opts)

View Source
dump(value :: term(), opts :: Keyword.t()) :: {:ok, term()} | {:error, atom()}

Key descriptive name.

Link to this callback

obfuscate(value)

View Source
obfuscate(value :: term()) :: {:ok, term()} | :obfuscate | {:error, atom()}
Link to this callback

obfuscate(value, opts)

View Source
obfuscate(value :: term(), opts :: Keyword.t()) ::
  {:ok, term()} | :obfuscate | {:error, atom()}
Link to this callback

parse(value)

View Source
parse(value :: any()) :: {:ok, term()} | {:error, atom()}
Link to this callback

parse(value, opts)

View Source
parse(value :: any(), opts :: Keyword.t()) :: {:ok, term()} | {:error, atom()}
Link to this callback

partition(value, partitions)

View Source
partition(value :: term(), partitions :: pos_integer()) ::
  {:ok, non_neg_integer()} | {:error, atom()}