StaticIdentifiable

protocol StaticIdentifiable

This protocol ensures that anything that conforms to it should be able to somewhat uniquely identify itself in code without an instance of the type on hand.

  • id

    Each conforming object of StaticIdentifiable needs to provide a statically reachable String id that can be used to identify which class is being used.

    Declaration

    Swift

    static var id: StaticIdentifier { get }
  • The static identifier reference from an instance of the type

    Declaration

    Swift

    var staticId: StaticIdentifier { get }