---
title: "encodeAtomicRepresentation(_:)"
framework: synchronization
role: symbol
role_heading: Type Method
path: "synchronization/wordpair/encodeatomicrepresentation(_:)"
---

# encodeAtomicRepresentation(_:)

Destroys a value of Self and prepares an AtomicRepresentation storage type to be used for atomic operations.

## Declaration

```swift
static func encodeAtomicRepresentation(_ value: consuming WordPair) -> WordPair.AtomicRepresentation
```

## Parameters

- `value`: A valid instance of Self that’s about to be destroyed to encode an instance of its AtomicRepresentation.

## Return Value

Return Value The newly encoded AtomicRepresentation storage.

## Discussion

Discussion note: This is not an atomic operation. This simply encodes the logical type Self into its storage representation suitable for atomic operations, AtomicRepresentation.
