protocol CustomDebugStringConvertible| Inheritance | View Protocol Hierarchy → |
|---|---|
| Import | import Swift |
Instance Variables
var debugDescription: String Required
A textual representation of self, suitable for debugging.
Declaration
var debugDescription: String { get }
A type with a customized textual representation suitable for debugging purposes.
This textual representation is used when values are written to an output stream by
debugPrint, and is typically more verbose than the text provided by aCustomStringConvertible'sdescriptionproperty.Note:
String(reflecting: instance)will work for aninstanceof any type, returning itsdebugDescriptionif theinstancehappens to beCustomDebugStringConvertible. UsingCustomDebugStringConvertibleas a generic constraint, or accessing a conforming type'sdebugDescriptiondirectly, is therefore discouraged.See Also:
String.init<T>(reflecting: T),CustomStringConvertible