SwitchboardResult
data class SwitchboardResult<T>(val success: Boolean, val value: T? = null, val error: String? = null)
The result of a Switchboard SDK operation.
Wraps either a successful value of type T or an error message, providing type-safe error handling without exceptions. Every method on Switchboard returns a SwitchboardResult.
Parameters
T
The type of the value held on success.
Functions
Link copied to clipboard
Returns the value on success, or default if the result is an error.
Link copied to clipboard
Returns the value on success, or throws SwitchboardException if the result is an error.