BiMap.fetch_key

You're seeing just the function fetch_key, go back to BiMap module for more information.

Specs

fetch_key(t(), v()) :: {:ok, k()} | :error

Fetches the key for specific value in bimap

This function is exact mirror of fetch/2.

Examples

iex> BiMap.fetch_key(BiMap.new, 1)
:error
iex> bimap = BiMap.new([a: 1])
iex> BiMap.fetch_key(bimap, 1)
{:ok, :a}
iex> BiMap.fetch_key(bimap, 2)
:error