ReflectedStringConvertible

public protocol ReflectedStringConvertible: CustomStringConvertible

This protocol/extension combination allows classes to be printed like struct’s.

Add ReflectedStringConvertible to any class definition and the extension will do the rest.

Credit: Matt Comi

Note

This will override the default ‘description’
  • description Extension method

    Undocumented

    Declaration

    Swift

    public protocol ReflectedStringConvertible: CustomStringConvertible