Package-level declarations

Types

Link copied to clipboard
sealed interface SessionResult<T : Failure>

Represents a result of a Session.

Properties

Link copied to clipboard

Returns a cold Flow of session's progress. It will emit current progress immediately when collecting is triggered.

Link copied to clipboard

Returns a cold Flow of session's state. It will emit current state immediately when collecting is triggered.

Functions

Link copied to clipboard
suspend fun <F : Failure> Session<F>.await(): SessionResult<F>

Launches the Session if it's not already, awaits for its completion without blocking a thread and resumes when it's complete, returning the resulting value or throwing the corresponding exception if the session was cancelled.