protocol
CustomDebugStringConvertible
Inheritance | View Protocol Hierarchy → |
---|---|
Import |
|
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
'sdescription
property.Note:
String(reflecting: instance)
will work for aninstance
of any type, returning itsdebugDescription
if theinstance
happens to beCustomDebugStringConvertible
. UsingCustomDebugStringConvertible
as a generic constraint, or accessing a conforming type'sdebugDescription
directly, is therefore discouraged.See Also:
String.init<T>(reflecting: T)
,CustomStringConvertible