-
Notifications
You must be signed in to change notification settings - Fork 31
Enumeration
An enumeration declaration.
public struct Enumeration: Declaration, Hashable, CodableCodable, CustomStringConvertible, Declaration, ExpressibleBySyntax, Hashable
Creates an instance initialized with the given syntax node.
public init(_ node: EnumDeclSyntax)The enumeration declaration attributes.
let attributes: [Attribute]The enumeration declaration modifiers.
let modifiers: [Modifier]The enumeration declaration keyword (enum).
let keyword: StringThe name of the enumeration.
let name: StringA list of inherited type names.
let inheritance: [String]If the enumeration is raw representable, the first element is the raw value type. Any other elements are names of protocols.
For example,
given the following declarations,
the inheritance of enumeration E is ["Int", "P"]:
protocol P {}
enum E: Int, P {}The generic parameters for the declaration.
let genericParameters: [GenericParameter]For example,
the following declaration of enumeration E
has a single generic parameter
whose name is "T" and type is "Equatable":
enum E<T: Equatable> {}The generic parameter requirements for the declaration.
let genericRequirements: [GenericRequirement]For example,
the following declaration of enumeration E
has a single requirement
that its generic parameter identified as "T"
conforms to the type identified as "Hahable":
enum E<T> where T: Hashable {}var description: StringGenerated at 2020-08-02T12:14:07+0000 using swift-doc 1.0.0-beta.3.
Types
- AssociatedType
- Attribute
- Attribute.Argument
- Class
- ConditionalCompilationBlock
- ConditionalCompilationBlock.Branch
- DeclarationCollector
- Deinitializer
- Enumeration
- Enumeration.Case
- Extension
- Function
- Function.Parameter
- Function.Signature
- GenericParameter
- GenericRequirement
- GenericRequirement.Relation
- Import
- Initializer
- Modifier
- Operator
- Operator.Kind
- PrecedenceGroup
- PrecedenceGroup.Associativity
- PrecedenceGroup.Relation
- Protocol
- Structure
- Subscript
- Typealias
- Variable
- Variable.Accessor
- Variable.Accessor.Kind