Function format [src]
Prototype
pub fn format(self: Ip4Address, w: *Io.Writer) Io.Writer.Error!void Parameters
self: Ip4Addressw: *Io.Writer Source
pub fn format(self: Ip4Address, w: *Io.Writer) Io.Writer.Error!void {
const bytes: *const [4]u8 = @ptrCast(&self.sa.addr);
try w.print("{d}.{d}.{d}.{d}:{d}", .{ bytes[0], bytes[1], bytes[2], bytes[3], self.getPort() });
}