Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Attribute_Argument

Mattt edited this page Aug 2, 2020 · 6 revisions

Attribute.Argument

An attribute argument.

public struct Argument:​ Hashable, Codable

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 "🚫"

Inheritance

Codable, CustomStringConvertible, Hashable

Properties

name

The argument name, if any.

let name:​ String?

value

The argument value.

let value:​ String

description

var description:​ String
Clone this wiki locally