Package-level declarations

Types

Link copied to clipboard
sealed class BleResult<out T>

A discriminated union that encapsulates the result of a BLE operation.

Functions

Link copied to clipboard

Creates a failed BleResult containing the given error.

Link copied to clipboard
fun <T> bleSuccess(data: T): BleResult<T>

Creates a successful BleResult containing the given data.

Link copied to clipboard
inline fun <T> runCatchingBle(block: () -> T): BleResult<T>

Wraps the execution of block in a BleResult.

Link copied to clipboard
fun <T, R> BleResult<T>.zip(other: BleResult<R>): BleResult<Pair<T, R>>

Combines two BleResult instances into a single result containing a Pair.