Format

public struct Format : CustomStringConvertible, CustomDebugStringConvertible, Hashable, Comparable

This struct holds a parsed format information instance.

Public Instance Properties

  • key

    This is the short format “key” string.

    Declaration

    Swift

    public let key: String
  • This is the short name for the format.

    Declaration

    Swift

    public let name: String
  • This is the longer description of the format.

    Declaration

    Swift

    public let description: String
  • This is the ISO 639-2 code for the language used for the name and description.

    Declaration

    Swift

    public let language: String
  • id

    This is the local server format ID.

    Declaration

    Swift

    public let id: String

Public Computed Properties

  • Returns the format, as single string, with values separarated by tabs.

    Declaration

    Swift

    public var asString: String { get }

Comparable Conformance

  • We simply sort by key, so there’s consistency in the ordering.

    Declaration

    Swift

    public static func < (lhs: Format, rhs: Format) -> Bool

    Parameters

    lhs

    The left-hand side of the comparison.

    rhs

    The right-hand side of the comparison.

    Return Value

    True, if the lhs ID is less than the rhs ID.

CustomDebugStringConvertible Conformance

  • Returns a simple textual description of the data.

    Declaration

    Swift

    public var debugDescription: String { get }