---
title: AsyncThrowingPrefixWhileSequence
framework: swift
role: symbol
role_heading: Structure
path: swift/asyncthrowingprefixwhilesequence
---

# AsyncThrowingPrefixWhileSequence

An asynchronous sequence, containing the initial, consecutive elements of the base sequence that satisfy the given error-throwing predicate.

## Declaration

```swift
struct AsyncThrowingPrefixWhileSequence<Base> where Base : AsyncSequence
```

## Topics

### Structures

- [AsyncThrowingPrefixWhileSequence.Iterator](swift/asyncthrowingprefixwhilesequence/iterator.md)

### Type Aliases

- [AsyncThrowingPrefixWhileSequence.Failure](swift/asyncthrowingprefixwhilesequence/failure.md)

### Default Implementations

- [AsyncSequence Implementations](swift/asyncthrowingprefixwhilesequence/asyncsequence-implementations.md)

## Relationships

### Conforms To

- [AsyncSequence](swift/asyncsequence.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Selecting Elements

- [prefix(_:)](swift/asyncsequence/prefix(_:).md)
- [AsyncPrefixSequence](swift/asyncprefixsequence.md)
- [prefix(while:)](swift/asyncsequence/prefix(while:)-2xy95.md)
- [AsyncPrefixWhileSequence](swift/asyncprefixwhilesequence.md)
- [prefix(while:)](swift/asyncsequence/prefix(while:)-6yp5n.md)
