WorkResult

sealed interface WorkResult

The outcome a BackgroundWorker returns from execute().

Sealed and named — not Kotlin's Result type — so SKIE generates a real exhaustive Swift enum (CLAUDE.md §8 rule 4).

Inheritors

Types

Link copied to clipboard
data class Failure(val reason: String) : WorkResult

Work failed permanently; do not retry. The reason is a short human-readable diagnostic — not an exception payload.

Link copied to clipboard
data object Retry : WorkResult

Transient failure; retry per the request's BackoffPolicy. The library converts this to Failure once BackoffPolicy.maxAttempts is exhausted.

Link copied to clipboard
data object Success : WorkResult

Work completed; do not retry.