URL.Template.Value
The value of a variable used for expanding a template.
Declaration
struct ValueOverview
A value can either be some text, a list, or an associate list (a dictionary).
Examples
let hello: URL.Template.Value = .text("Hello World!")
let list: URL.Template.Value = .list(["red", "green", "blue"])
let keys: URL.Template.Value = .associativeList([
"semi": ";",
"dot": ".",
"comma": ",",
])Alternatively, for constants, the ExpressibleBy…Literal implementations can be used, i.e.
let hello: URL.Template.Value = "Hello World!"
let list: URL.Template.Value = ["red", "green", "blue"]
let keys: URL.Template.Value = [
"semi": ";",
"dot": ".",
"comma": ",",
]