-
Notifications
You must be signed in to change notification settings - Fork 29
Modifier
A declaration modifier.
public struct Modifier: Hashable, Codable
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
-
The first modifier has a
name
equal to"public"
, and a nildetail
-
The second modifier has a
name
equal to"private"
and adetail
equal to"set"
Codable
, CustomStringConvertible
, ExpressibleBySyntax
, Hashable
Creates an instance initialized with the given syntax node.
public init(_ node: DeclModifierSyntax)
The declaration modifier name.
let name: String
The modifier detail, if any.
let detail: String?
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