---
title: Subscribers.Assign
framework: combine
role: symbol
role_heading: Class
path: combine/subscribers/assign
---

# Subscribers.Assign

A simple subscriber that assigns received elements to a property indicated by a key path.

## Declaration

```swift
final class Assign<Root, Input>
```

## Mentioned in

Processing Published Elements with Subscribers

## Topics

### Creating an assign subscriber

- [init(object:keyPath:)](combine/subscribers/assign/init(object:keypath:).md)

### Receiving elements

- [receive(_:)](combine/subscribers/assign/receive(_:).md)

### Receiving life cycle events

- [receive(subscription:)](combine/subscribers/assign/receive(subscription:).md)
- [receive(completion:)](combine/subscribers/assign/receive(completion:).md)

### Inspecting the assigned property

- [object](combine/subscribers/assign/object.md)
- [keyPath](combine/subscribers/assign/keypath.md)

### Supporting Debugging

- [customMirror](combine/subscribers/assign/custommirror.md)
- [description](combine/subscribers/assign/description.md)
- [playgroundDescription](combine/subscribers/assign/playgrounddescription.md)

### Instance Methods

- [cancel()](combine/subscribers/assign/cancel().md)

## Relationships

### Conforms To

- [Cancellable](combine/cancellable.md)
- [CustomCombineIdentifierConvertible](combine/customcombineidentifierconvertible.md)
- [CustomPlaygroundDisplayConvertible](swift/customplaygrounddisplayconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Subscriber](combine/subscriber.md)

## See Also

### Using convenience subscribers

- [Subscribers.Sink](combine/subscribers/sink.md)
