StreamResponse

sealed class StreamResponse<T>

Response wrapper specifically for streaming operations in the SDK.

This class extends the concept of Response to handle streaming data that comes as a sequence of items, with a distinct end signal and potential failures at any point.

Parameters

T

The type of data being streamed.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Data<T>(val data: T) : StreamResponse<T>

Represents a chunk of data in the stream.

Link copied to clipboard
class End<T> : StreamResponse<T>

Indicates the end of the stream.

Link copied to clipboard
data class Failure<T>(val exception: Exception) : StreamResponse<T>

Represents a failure in the stream.

Properties

Link copied to clipboard

Indicates whether this response represents a success.