Structure
GenericParameter
public struct GenericParameter: Hashable, Codable
A generic parameter.
A generic type or function declaration includes a generic parameter clause,
consisting of one or more generic parameters enclosed by angle brackets (<>
).
Each generic parameter has a name,
and may also specify a type constraint.
For example,
the following structure declaration has two generic parameters:
struct S<T, U: Equatable>
Relationships
Conforms To
ExpressibleBySyntax
A type that can be initialized with a Swift syntax node.
Codable
CustomStringConvertible
Hashable
Initializers
init(_:)
public init(_ node: GenericParameterSyntax)
Creates an instance initialized with the given syntax node.
Properties
name
let name: String
The generic parameter name.
type
let type: String?
The generic parameter type, if any.
description
var description: String