ManagedResource

interface ManagedResource<out Error>

Represent a resource that can be initialized and finalized. The initialization and finalization can either fail with an Error or succeed.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun finalize(): Either<Error, Unit>

Asynchronously finalizes the entity. Can Either succeed or fail with an Error.

Link copied to clipboard
abstract suspend fun initialize(): Either<Error, Unit>

Asynchronously initializes the entity. Can Either succeed or fail with an Error.