---
title: ByteCountFormatter.Units
framework: foundation
role: symbol
role_heading: Structure
path: foundation/bytecountformatter/units
---

# ByteCountFormatter.Units

Specifies the units appropriate for the formatter to display. Specifying any units explicitly causes just those units to be used in showing the number.

## Declaration

```swift
struct Units
```

## Topics

### Constants

- [useBytes](foundation/bytecountformatter/units/usebytes.md)
- [useKB](foundation/bytecountformatter/units/usekb.md)
- [useMB](foundation/bytecountformatter/units/usemb.md)
- [useGB](foundation/bytecountformatter/units/usegb.md)
- [useTB](foundation/bytecountformatter/units/usetb.md)
- [usePB](foundation/bytecountformatter/units/usepb.md)
- [useEB](foundation/bytecountformatter/units/useeb.md)
- [useZB](foundation/bytecountformatter/units/usezb.md)
- [useYBOrHigher](foundation/bytecountformatter/units/useyborhigher.md)
- [useAll](foundation/bytecountformatter/units/useall.md)

### Initializers

- [init(rawValue:)](foundation/bytecountformatter/units/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Constants

- [ByteCountFormatter.CountStyle](foundation/bytecountformatter/countstyle-swift.enum.md)
