pub fn eql(a: *const IpAddress, b: *const IpAddress) bool
a: *const IpAddress
b: *const IpAddress
187 188 189 190 191 192 193 194 195 196 197 198
pub fn eql(a: *const IpAddress, b: *const IpAddress) bool { return switch (a.*) { .ip4 => |a_ip4| switch (b.*) { .ip4 => |b_ip4| a_ip4.eql(b_ip4), else => false, }, .ip6 => |a_ip6| switch (b.*) { .ip6 => |b_ip6| a_ip6.eql(b_ip6), else => false, }, }; }