StreamResponseEnum
public enum StreamResponseEnum<Data> : Sendable where Data : Decodable, Data : Sendable
Represents the possible responses from a Server-Sent Events (SSE) stream connection.
-
Stream connection established successfully.
Declaration
Swift
case open -
Data received from the stream with an event ID and decoded payload.
Declaration
Swift
case response(id: String, data: Data) -
Error occurred during streaming.
Declaration
Swift
case error(error: Error?) -
Closure type for handling stream responses.
Declaration
Swift
public typealias ResponseClosure = @Sendable (_ response: StreamResponseEnum<Data>) -> (Void)
View on GitHub
Install in Dash