Instance Property
description
Returns "host:port" with no transformation of either component.
var description: String { get }
Return Value
The string "\(host):\(port)".
Discussion
Intended for log lines and error messages. The format is intentionally unquoted, unbracketed, and unescaped: description is not a URL authority component and must not be treated as one.
Important
For IPv6 literals the result is ambiguous (the colons in the address collide with the host/port separator). Callers producing URLs or proxy dictionaries from a HostPort with an IPv6 host must bracket the host themselves, e.g. HostPort(host: "[::1]", port: 9050).description == "[::1]:9050".
See Also
RFC 3986 §3.2.2 on URI host syntax.