SwiftclassProductKit

class ProductKit.AsyncChannel

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

inherits{}

Members 9

  1. deinitdeinit
  2. fieldlet state: ProductKit.ManagedCriticalState<ProductKit.AsyncChannel<A>.State>+0x10
  3. funcfinish() -> ()
  4. funcmakeAsyncIterator() -> ProductKit.AsyncChannel<A>.Iterator
  5. funcsend(A) async -> ()
  6. initProductKit.AsyncChannel.__allocating_init(element: A.Type) -> ProductKit.AsyncChannel<A>
  7. typealiastypealias AsyncIterator = ProductKit.AsyncChannel<A>.Iterator
  8. typealiastypealias Element = A
  9. typealiastypealias Failure = Swift.Never
class AsyncChannel<A> {
    struct Iterator {
        let channel: ProductKit.AsyncChannel<A>
        var active: Swift.Bool

        func next() async -> A?
    }
    struct State {
        var emission: ProductKit.AsyncChannel<A>.Emission
        var generation: Swift.Int
        var terminal: Swift.Bool
    }
    struct Awaiting {
        var generation: Swift.Int
        var continuation: Swift.UnsafeContinuation<A?, Swift.Never>?
        let cancelled: Swift.Bool
    }
    enum Emission {
        case pending([Swift.UnsafeContinuation<Swift.UnsafeContinuation<A?, Swift.Never>?, Swift.Never>])
        case awaiting(Swift.Set<ProductKit.AsyncChannel<A>.Awaiting>)
        case idle
    }
    let state: ProductKit.ManagedCriticalState<ProductKit.AsyncChannel<A>.State>

    init(element: A.Type)

    final func makeAsyncIterator() -> ProductKit.AsyncChannel<A>.Iterator
    final func send(_: A) async
    final func finish()

    deinit
}