TraitEncodable

protocol TraitEncodable

Basic interface for entities that can be encoded as Traits.

  • The trait identifier.

    Declaration

    Swift

    static var identifier: String { get }
  • Writes this object to the given TraitEncoder. Throws HomeError.encodingFailed if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • identifier

    Extension method

    Returns the Trait Identifier for this instance.

    Declaration

    Swift

    var identifier: String { get }