Skip to content

Progress

sealed interface Progress

Is work currently happening?

Values of this type can be in two different states:

  • Done: no work is happening.

  • Loading: work is happening.

For ease of use, the factory functions done and loading are provided.

Implementation notes

All implementations of Progress must be deeply immutable. To communicate the advancement of progress over time, report multiple progress objects.

Inheritors

Types

Companion

object Companion

Done

data object Done : Progress

No work is currently happening.

Loading

sealed interface Loading : Progress

Work is currently happening.