CustomReflectable

protocol CustomReflectable

A type that explicitly supplies its own mirror.

You can create a mirror for any type using the Mirror(reflecting:) initializer, but if you are not satisfied with the mirror supplied for your type by default, you can make it conform to CustomReflectable and return a custom Mirror instance.

Inheritance View Protocol Hierarchy →
Import import Swift

Instance Variables

var customMirror: Mirror Required

The custom mirror for this instance.

If this type has value semantics, the mirror should be unaffected by subsequent mutations of the instance.

Declaration

var customMirror: Mirror { get }