RawValueEnumCase

public struct RawValueEnumCase<V> : EnumCase

A Fragment that is rendered as a raw value enum case

  • Initializer

    Declaration

    Swift

    @inlinable
    public init(name: String, value: V?)

    Parameters

    name

    The name of the case

    value

    The value of the case

  • The name of the enum case

    Declaration

    Swift

    public let name: String
  • The rawValue of the enum case

    Declaration

    Swift

    public let value: V?
  • Renders this RawValueEnumCase as a string.

    The String format is as follows: when value is not nil:

    "case \(self.name) = \(value)"
    

    when value is nil:

    "case \(self.name)"
    

    Declaration

    Swift

    @inlinable
    public func renderContent() -> String