Stream
public struct Stream<Success, Failure> : Sendable where Success : Sendable, Failure : Error
Type encapsulating an Event as it flows through the stream, as well as a CancellationToken which can be used
to stop the stream at any time.
-
Token used to cancel the stream.
Declaration
Swift
public let token: CancellationToken -
Cancel the ongoing stream by canceling the underlying
DataStreamRequest.Declaration
Swift
public func cancel() -
Incoming
Resultvalues fromEvent.stream.Declaration
Swift
public var result: Result<Success, Failure>? { get } -
Successvalue of the instance, if any.Declaration
Swift
public var value: Success? { get } -
Failurevalue of the instance, if any.Declaration
Swift
public var error: Failure? { get } -
Completionvalue of the instance, if any.Declaration
Swift
public var completion: DataStreamRequest.Completion? { get }
View on GitHub
Install in Dash