Data

public enum Data<T>
extension Data: ExpressibleByArrayLiteral
extension Data: Encodable where T: Encodable
extension Data: ExpressibleByFloatLiteral where T: ExpressibleByFloatLiteral
extension Data: ExpressibleByIntegerLiteral where T: ExpressibleByIntegerLiteral
extension Data: ExpressibleByUnicodeScalarLiteral where T: ExpressibleByUnicodeScalarLiteral
extension Data: ExpressibleByExtendedGraphemeClusterLiteral where T: ExpressibleByExtendedGraphemeClusterLiteral
extension Data: ExpressibleByStringLiteral where T: ExpressibleByStringLiteral
extension Data: ExpressibleByStringInterpolation where T: StringProtocol

Encapsulation of either a constant value or a collection of changing data.

  • Constant, fixed value.

    Declaration

    Swift

    case constant(_: T)
  • Changing collection of values.

    Declaration

    Swift

    case variable(_: [T])
  • Declaration

    Swift

    public init(arrayLiteral elements: T...)

Available where T: Encodable

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws

Available where T: ExpressibleByFloatLiteral

Available where T: ExpressibleByIntegerLiteral

Available where T: ExpressibleByUnicodeScalarLiteral

Available where T: ExpressibleByExtendedGraphemeClusterLiteral

Available where T: ExpressibleByStringLiteral