AssociatedType

public struct AssociatedType : Declaration, Hashable, Codable
extension AssociatedType: ExpressibleBySyntax

An associated type declaration.

  • A dot-delimited (.) path used to qualify the associated type name within the module scope of the declaration.

    For example, given the following declaration of an associated type T, the context is "P":

    protocol P { associatedtype T }
    

    Declaration

    Swift

    public let context: String?
  • The declaration attributes.

    Declaration

    Swift

    public let attributes: [Attribute]
  • The declaration modifiers.

    Declaration

    Swift

    public let modifiers: [Modifier]
  • The declaration keyword ("associatedtype").

    Declaration

    Swift

    public let keyword: String
  • The associated type name.

    Declaration

    Swift

    public let name: String

ExpressibleBySyntax

  • Creates an instance initialized with the given syntax node.

    Declaration

    Swift

    public init(_ node: AssociatedtypeDeclSyntax)