flix

0.61.0

IpAddr

enum IpAddr with Eq, ToStringSource
case V4(Ipv4Addr)case V6(Ipv6Addr)

Represents an IP address.

Instances

instance Eq[IpAddr]Source
instance FromString[IpAddr]Source
instance ToString[IpAddr]Source

Definitions

def fromBytes(l: List[Int8]): IpAddr Source

Converts a List[Int8] into IpAddr

an Ipv4 is 4 bytes and Ipv6 is 16 bytes

def fromString(s: String): Option[IpAddr] Source

Attempts to parse the given String s as an IpAddr.

Returns Some(addr) if the string was successfully parsed. Otherwise returns None.

def toBytes(ip: IpAddr): Vector[Int8] Source

Converts an IpAddr into an Vector[Int8]

an Ipv4 is 4 bytes and Ipv6 is 16 bytes