Back to Sourcery

Enum

docs/Classes/Enum.html

2.3.01.9 KB
Original Source

Enum

@objcMembers
public final class Enum : Type

Defines Swift enum

`

                kind
                `

Declaration

Swift

public class var kind: String { get }

`

                kind
                `

Returns “enum”

Declaration

Swift

public override var kind: String { get }

`

                cases
                `

Enum cases

Declaration

Swift

public var cases: [EnumCase]

`

                rawTypeName
                `

Enum raw value type name, if any. This type is removed from enum’s based and inherited types collections.

Important

Unless raw type is specified explicitly via type alias RawValue it will be set to the first type in the inheritance chain. So if your enum does not have raw value but implements protocols you’ll have to specify conformance to these protocols via extension to get enum with nil raw value type and all based and inherited types.

Declaration

Swift

public var rawTypeName: TypeName? { get set }

`

                rawType
                `

Enum raw value type, if known

Declaration

Swift

public var rawType: Type?

`

                based
                `

Names of types or protocols this type inherits from, including unknown (not scanned) types

Declaration

Swift

public override var based: [String : String] { get set }

`

                hasAssociatedValues
                `

Whether enum contains any associated values

Declaration

Swift

public var hasAssociatedValues: Bool { get }

`

                diffAgainst(_:)
                `

Declaration

Swift

override public func diffAgainst(_ object: Any?) -> DiffableResult

Copyright © 2016-2021 Pixle. All rights reserved.

Generated by jazzy ♪♫ v0.14.0, a Realm project.