Iptrie.get

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

Specs

get(t(), prefix() | [prefix()]) :: {prefix(), any()} | nil | [{prefix(), any()}]

Return one or more prefix,value-pair(s) using an exact match for given prefix(es).

Examples

iex> ipt = new([{"1.1.1.0/30", "A"}, {"1.1.1.0/31", "B"}, {"1.1.1.0", "C"}])
iex>
iex> get(ipt, "1.1.1.0/31")
{"1.1.1.0/31", "B"}
iex>
iex> # or get a list of entries
iex>
iex> get(ipt, ["1.1.1.0/30", "1.1.1.0"])
[{"1.1.1.0/30", "A"}, {"1.1.1.0", "C"}]