Success

class Success<T>(response: T) : NetworkResult<T>

Represents a successful network operation.

Parameters

response

The successful response data.

Constructors

Link copied to clipboard
constructor(response: T)

Properties

Link copied to clipboard
val data: T

The successful response data as a non-null value. Because a Success is only ever constructed with a non-null response, this offers null-free access without the defensive checks a nullable NetworkResult.response would otherwise require.

Link copied to clipboard

A message providing additional information about the result; empty by default for Success and Loading, and always populated for Error.

Link copied to clipboard
val response: T?

The response data if the operation was successful.