IP.Subnet.new

You're seeing just the function new, go back to IP.Subnet module for more information.
Link to this function

new(routing_prefix, bit_length)

View Source

Specs

new(IP.v4(), 0..32) :: t(IP.v4())
new(IP.v6(), 0..128) :: t(IP.v6())

creates a new IP Subnet struct from a routing prefix and bit length.

The routing prefix must be an actual routing prefix for the bit length, otherwise it will raise ArgumentError. If you are attempting to find the subnet for a given ip address, use of/2