We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
A protocol declaration.
public struct Protocol: Declaration, Hashable, Codable
Codable, CustomStringConvertible, Declaration, ExpressibleBySyntax, Hashable
Codable
CustomStringConvertible
Declaration
ExpressibleBySyntax
Hashable
init(_:)
Creates an instance initialized with the given syntax node.
public init(_ node: ProtocolDeclSyntax)
attributes
The declaration attributes.
let attributes: [Attribute]
modifiers
The declaration modifiers.
let modifiers: [Modifier]
keyword
The declaration keyword ("protocol").
"protocol"
let keyword: String
name
The protocol name.
let name: String
inheritance
A list of adopted protocols.
let inheritance: [String]
For example, given the following declarations, the inheritance of protocol P is ["Q"]:
P
["Q"]
protocol Q {} protocol P: Q {}
description
var description: String