AmplifyAsyncSequence
public class AmplifyAsyncSequence<Element> : AsyncSequence, Cancellable, @unchecked Sendable where Element : Sendable
Note
@unchecked Sendable because parent and isCancelled are mutable but
every access is serialized by lock. The compiler cannot verify that, so the
guarantee is asserted here and enforced by the accessors below.
-
Declaration
Swift
public typealias Iterator = AsyncStream<Element>.Iterator -
Externally read-only, exactly as the previous
public private(set)stored property was.Declaration
Swift
public var isCancelled: Bool { get } -
Declaration
Swift
public init( parent: Cancellable? = nil, bufferingPolicy: AsyncStream<Element>.Continuation.BufferingPolicy = .unbounded ) -
Declaration
Swift
public func makeAsyncIterator() -> Iterator -
Declaration
Swift
public func send(_ element: Element) -
Declaration
Swift
public func finish() -
Declaration
Swift
public func cancel()
View on GitHub