AssociatedValueEnumCase

public struct AssociatedValueEnumCase : MixableEnumCase

A Fragment that is rendered as an enum case with an associated value

  • Initializer

    Declaration

    Swift

    @inlinable
    public init(name: String, types: [String])

    Parameters

    name

    The name of the case

    types

    The associated values of the case

  • The name of the enum case

    Declaration

    Swift

    public let name: String
  • The associated value data types of the enum case

    Declaration

    Swift

    public let types: [String]
  • Renders this AssociatedValueEnumCase as a string.

    The String format is as follows:

    "case \(self.name) = \(types)" // where types is a comma separated String
    

    Declaration

    Swift

    @inlinable
    public func renderContent() -> String