gip
Types
pub type IP {
V4(#(Int, Int, Int, Int))
V6(
#(
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
Int,
),
)
}
Constructors
-
V4(#(Int, Int, Int, Int))
An IPV4 respresented as a tuple of 4xInt(Int.Int.Int.Int) All Int’s will fall in the bounds 0 <= Int < 255
-
V6( #( Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, ), )
An IPV4 respresented as a tuple of 16xInt(Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int.Int) All Int’s will fall in the bounds 0 <= Int < 255
Functions
pub fn parse(ip: String) -> Result(IP, String)
Parses the provided String into an Ip Or povides a message detailing what went wrong
pub fn self() -> Result(IP, String)
Returns the Ip of the current machine Or povides a message detailing what went wrong