---
title: URL.Template.Value
framework: foundation
role: symbol
role_heading: Structure
path: foundation/url/template/value
---

# URL.Template.Value

The value of a variable used for expanding a template.

## Declaration

```swift
struct Value
```

## Overview

Overview 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": ",", ]

## Topics

### Type Methods

- [associativeList(_:)](foundation/url/template/value/associativelist(_:).md)
- [list(_:)](foundation/url/template/value/list(_:).md)
- [text(_:)](foundation/url/template/value/text(_:).md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [ExpressibleByDictionaryLiteral](swift/expressiblebydictionaryliteral.md)
- [ExpressibleByExtendedGraphemeClusterLiteral](swift/expressiblebyextendedgraphemeclusterliteral.md)
- [ExpressibleByStringLiteral](swift/expressiblebystringliteral.md)
- [ExpressibleByUnicodeScalarLiteral](swift/expressiblebyunicodescalarliteral.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
