docs/Classes/DataStreamRequest/Stream.html
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.
`
event
`
Latest Event from the stream.
Swift
public let event: Event<Success, Failure>
`
token
`
Token used to cancel the stream.
Swift
public let token: CancellationToken
`
cancel()
`
Cancel the ongoing stream by canceling the underlying DataStreamRequest.
Swift
public func cancel()
`
result
`
Incoming Result values from Event.stream.
Swift
public var result: Result<Success, Failure>? { get }
`
value
`
Success value of the instance, if any.
Swift
public var value: Success? { get }
`
error
`
Failure value of the instance, if any.
Swift
public var error: Failure? { get }
`
completion
`
Completion value of the instance, if any.
Swift
public var completion: DataStreamRequest.Completion? { get }