Implementions
Methods
[src]
pub fn to_string(self): string {
return (self as _Ip).to_string();
}
Returns a string representation.
[src]
pub fn to_string(self): string {
return (self as _Ip).to_string();
}
Returns a string representation.
Returns a string representation.
[src]
pub fn parse(s: string): Ip? {
if (let ip = _Ip.parse(s)) {
return ip as Ip;
} else {
return nil;
}
}
Parses a string representation of a IP address.
[src]
pub fn parse(s: string): Ip? {
if (let ip = _Ip.parse(s)) {
return ip as Ip;
} else {
return nil;
}
}
Parses a string representation of a IP address.
Parses a string representation of a IP address.
[src]
pub fn v4(a: int, b: int, c: int, d: int): Ip {
return _Ip.v4(a, b, c, d) as Ip;
}
Creates an IPv4 address.
[src]
pub fn v4(a: int, b: int, c: int, d: int): Ip {
return _Ip.v4(a, b, c, d) as Ip;
}
Creates an IPv4 address.
Creates an IPv4 address.
[src]
pub fn v6(a: int, b: int, c: int, d: int, e: int, f: int, g: int, h: int): Ip {
return _Ip.v6(a, b, c, d, e, f, g, h) as Ip;
}
Creates an IPv6 address.
[src]
pub fn v6(a: int, b: int, c: int, d: int, e: int, f: int, g: int, h: int): Ip {
return _Ip.v6(a, b, c, d, e, f, g, h) as Ip;
}
Creates an IPv6 address.
Creates an IPv6 address.
[src]
pub fn is_ipv4(self): bool {
return (self as _Ip).is_ipv4();
}
Returns true`` if the IP address is an IPv4 address, and
false` otherwise.
[src]
pub fn is_ipv4(self): bool {
return (self as _Ip).is_ipv4();
}
Returns true`` if the IP address is an IPv4 address, and
false` otherwise.
Returns true`` if the IP address is an IPv4 address, and
false` otherwise.