NetAddr.PrefixSet.new
You're seeing just the function
new
, go back to NetAddr.PrefixSet module for more information.
Specs
new() :: t()
Create an empty prefix set.
Examples
iex> NetAddr.PrefixSet.new
%NetAddr.PrefixSet{prefixes: []}
Specs
Create a prefix set containing the NetAddrs in list
.
Examples
iex> use NetAddr
iex> require NetAddr.PrefixSet, as: PrefixSet
iex> PrefixSet.new([~p"192.0.2.0/24", ~p"198.51.100.0/24"])
%NetAddr.PrefixSet{prefixes: [
%NetAddr.IPv4{address: <<192,0,2,0>>, length: 24},
%NetAddr.IPv4{address: <<198,51,100,0>>, length: 24}
]
}