Argument

public struct Argument : Hashable, Codable
extension Attribute.Argument: CustomStringConvertible

An attribute argument.

Certain attributes take one or more arguments, each of which have a value and optional name. For example, the following attribute declaration has three arguments:

@available(*, unavailable, message: "🚫")
  • The first argument is unnamed and has the value "*"
  • The second argument is unnamed and has the value "unavailable"
  • The third argument has the name “renamed” and the value "🚫"
  • The argument name, if any.

    Declaration

    Swift

    public let name: String?
  • The argument value.

    Declaration

    Swift

    public let value: String

CustomStringConvertible

  • Declaration

    Swift

    public var description: String { get }