---
title: AsyncThrowingPublisher
framework: combine
role: symbol
role_heading: Structure
path: combine/asyncthrowingpublisher
---

# AsyncThrowingPublisher

A publisher that exposes its elements as a throwing asynchronous sequence.

## Declaration

```swift
struct AsyncThrowingPublisher<P> where P : Publisher
```

## Overview

Overview AsyncThrowingPublisher conforms to AsyncSequence, which allows callers to receive values with the for-await-in syntax, rather than attaching a Subscriber. If the upstream publisher terminates with an error, AsyncThrowingPublisher throws the error to the awaiting caller. Use the values property of the Publisher protocol to wrap an existing publisher with an instance of this type.

## Topics

### Creating an asynchronous publisher

- [init(_:)](combine/asyncthrowingpublisher/init(_:).md)

### Creating an iterator

- [makeAsyncIterator()](combine/asyncthrowingpublisher/makeasynciterator().md)
- [AsyncThrowingPublisher.Iterator](combine/asyncthrowingpublisher/iterator.md)

### Supporting types

- [AsyncThrowingPublisher.Element](combine/asyncthrowingpublisher/element.md)

## Relationships

### Conforms To

- [AsyncSequence](swift/asyncsequence.md)

## See Also

### Asynchronous Publishers

- [AsyncPublisher](combine/asyncpublisher.md)
