ContSyntax

interface ContSyntax

ContSyntax exposes abort which allows for interruption of the computation, meaning that when abort is encountered the Cont will be interrupted and will not yield a value.

However it's a pure interruption of the computation, meaning it doesn't involve throwing exceptions or halting the program. Other functions like guard or ensureNotNull are utility derivation of abort.

Functions

abort
Link copied to clipboard
abstract suspend fun <A> abort(): A
ensure
Link copied to clipboard
open suspend fun ensure(condition: Boolean)

Inheritors

ContSeqSyntax
Link copied to clipboard