SwitchboardResult

data class SwitchboardResult<T>(val success: Boolean, val value: T? = null, val error: String? = null)

Result wrapper for Switchboard V3 API operations Provides type-safe error handling similar to iOS SBResult

Constructors

Link copied to clipboard
constructor(success: Boolean, value: T? = null, error: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val error: String? = null
Link copied to clipboard

Returns true if the operation failed

Link copied to clipboard

Returns true if the operation was successful

Link copied to clipboard
Link copied to clipboard
val value: T? = null

Functions

Link copied to clipboard

Extension function to get value or return default

Link copied to clipboard

Extension function to safely get value or throw exception