---
title: Measurement.AttributedStyle
framework: foundation
role: symbol
role_heading: Structure
path: foundation/measurement/attributedstyle
---

# Measurement.AttributedStyle

A type that provides localized representations of measurements with an attributed string.

## Declaration

```swift
@dynamicMemberLookup struct AttributedStyle
```

## Overview

Overview Use either the formatted() or the formatted(_:) instance method of Measurement to create an attributed string representation of a measurement. The formatted() method generates a string using the default measurement format style.

## Topics

### Formatting a Measurement

- [format(_:)](foundation/measurement/attributedstyle/format(_:).md)

### Modififying a Measurement Attributed Style

- [locale(_:)](foundation/measurement/attributedstyle/locale(_:).md)

### Comparing Measurement Attributed Styles

- [==(_:_:)](foundation/measurement/==(_:_:).md)

### Structures

- [Measurement.AttributedStyle.ByteCount](foundation/measurement/attributedstyle/bytecount.md)

### Subscripts

- [subscript(dynamicMember:)](foundation/measurement/attributedstyle/subscript(dynamicmember:)-83rva.md)
- [subscript(dynamicMember:)](foundation/measurement/attributedstyle/subscript(dynamicmember:)-c2b1.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [FormatStyle](foundation/formatstyle.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Formatting a Measurement

- [formatted()](foundation/measurement/formatted().md)
- [formatted(_:)](foundation/measurement/formatted(_:).md)
- [Measurement.FormatStyle](foundation/measurement/formatstyle.md)
