This repository was archived by the owner on Oct 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Protocol
Mattt edited this page Aug 2, 2020
·
7 revisions
A protocol declaration.
public struct Protocol: Declaration, Hashable, CodableCodable, CustomStringConvertible, Declaration, ExpressibleBySyntax, Hashable
Creates an instance initialized with the given syntax node.
public init(_ node: ProtocolDeclSyntax)The declaration attributes.
let attributes: [Attribute]The declaration modifiers.
let modifiers: [Modifier]The declaration keyword ("protocol").
let keyword: StringThe protocol name.
let name: StringA list of adopted protocols.
let inheritance: [String]For example,
given the following declarations,
the inheritance of protocol P is ["Q"]:
protocol Q {}
protocol P: Q {}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