Structure
Modifier
public struct Modifier: Hashable, Codable
A declaration modifier.
A declaration may have one or more modifiers to
specify access control (private
/ public
/ etc.),
declare a type member (class
/ static
),
or designate its mutability (nonmutating
).
A declaration modifier may specify an additional detail
within enclosing parentheses (()
)
following its name.
For example, the following property declaration has two modifiers:
public private(set) var title: String
Relationships
Conforms To
ExpressibleBySyntax
A type that can be initialized with a Swift syntax node.
Codable
CustomStringConvertible
Hashable
Initializers
init(_:)
public init(_ node: DeclModifierSyntax)
Creates an instance initialized with the given syntax node.
Properties
name
let name: String
The declaration modifier name.
detail
let detail: String?
The modifier detail, if any.
description
var description: String