pub fn formatResolved(a: *const Ip6Address, io: Io, w: *Io.Writer) FormatError!void a: *const Ip6Addressio: Iow: *Io.Writer727
728
729
730
731
732
733
734 pub fn formatResolved(a: *const Ip6Address, io: Io, w: *Io.Writer) FormatError!void {
const interface_name = if (a.interface.isNone()) null else try a.interface.name(io);
const u: Unresolved = .{
.bytes = a.bytes,
.interface_name = if (interface_name) |name| name.toSlice() else null,
};
try w.print("[{f}]:{d}", .{ u, a.port });
}
Includes the optional scope ("%foo" at the end).
See
formatfor an alternative that omits scopes and does not require anIoparameter.