Pfx.valid-question-mark
You're seeing just the function
valid-question-mark
, go back to Pfx module for more information.
Specs
Returns a boolean indicating whether pfx
is a valid prefix/0
or not.
Examples
iex> valid?("1.2.3.4")
true
iex> valid?("1.2.3.4/8")
true
iex> valid?({1, 2, 3, 4})
true
iex> valid?({{1, 2, 3, 4}, 24})
true
iex> valid?(%Pfx{bits: <<1,2,3,4>>, maxlen: 32})
true
# bits exceed maxlen
iex> valid?(%Pfx{bits: <<1,2,3,4>>, maxlen: 16})
false