-
Notifications
You must be signed in to change notification settings - Fork 29
Structure
A structure declaration.
public struct Structure: Declaration, Hashable, Codable
Codable
, CustomStringConvertible
, Declaration
, ExpressibleBySyntax
, Hashable
Creates an instance initialized with the given syntax node.
public init(_ node: StructDeclSyntax)
The declaration attributes.
let attributes: [Attribute]
The declaration modifiers.
let modifiers: [Modifier]
The declaration keyword ("struct"
).
let keyword: String
The structure name.
let name: String
A list of adopted protocols.
let inheritance: [String]
For example,
given the following declarations,
the inheritance
of structure S
is ["P", "Q"]
:
protocol P {}
protocol Q {}
struct S {}
The generic parameters for the declaration.
let genericParameters: [GenericParameter]
For example,
the following declaration of structure S
has a single generic parameter
whose name
is "T"
and type
is "Equatable"
:
struct S<T: Equatable> {}
The generic parameter requirements for the declaration.
let genericRequirements: [GenericRequirement]
For example,
the following declaration of structure S
has a single requirement
that its generic parameter identified as "T"
conforms to the type identified as "Hahable"
:
struct S<T> where T: Hashable {}
var description: String
Generated 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