flix

0.79.0

IpAddr

Type of IP addresses, and its functions.

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

Type of IP addresses.

An IP address is either an IPv4 or an IPv6 address.

Instances

Eq, Formattable, FromString, ToString

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