API Reference
The library provides four sealed classes for managing UI state transitions.
| State Class | Description |
|---|---|
LoadState<Value> | Manages states for loading data: Idle, Loading, Loaded, Failure |
SaveState<Value> | Manages states for saving data: Idle, Saving, Saved, Failure |
MutationState<Value> | Manages states for mutating data with original/updated tracking: Idle, Mutating, Mutated, Failure |
ResourceState<Value> | Unified state machine combining loading and saving: Idle, Loading, Loaded, LoadFailure, Saving, Saved, SaveFailure |
All state classes use Kotlin’s sealed class for exhaustive when expressions and provide extension functions with Kotlin contracts for smart casting.