Function format [src]
Prototype
pub fn format(self: Address, w: *Io.Writer) Io.Writer.Error!void
Parameters
self: Address
w: *Io.Writer
Source
pub fn format(self: Address, w: *Io.Writer) Io.Writer.Error!void {
switch (self.any.family) {
posix.AF.INET => try self.in.format(w),
posix.AF.INET6 => try self.in6.format(w),
posix.AF.UNIX => {
if (!has_unix_sockets) unreachable;
try w.writeAll(std.mem.sliceTo(&self.un.path, 0));
},
else => unreachable,
}
}