Success
//fluxbase-kotlin/io.github.nimbleflux.fluxbase/FluxbaseResponse/Success
Success
Section titled “Success”[jvm]
data class Success<T>(val data: T) : FluxbaseResponse<T>
Successful result.
Constructors
Section titled “Constructors”| Success | [jvm] constructor(data: T) |
Properties
Section titled “Properties”| Name | Summary |
|---|---|
| data | [jvm] open override val data: T The data payload on success, or null on error. In the TS SDK this is the data field. |
| error | [jvm] open override val error: FluxbaseError? The error on failure. Null on success. |
Functions
Section titled “Functions”| Name | Summary |
|---|---|
| component2 | [jvm] open operator fun component2(): FluxbaseError? |
| getOrNull | [jvm] fun <T> FluxbaseResponse<T>.getOrNull(): T? Returns the data on success, or null on error. Equivalent to result.data in the TS SDK. |
| getOrThrow | [jvm] fun <T> FluxbaseResponse<T>.getOrThrow(): T Returns the data on success, or throws the error on failure. |