Scoop API

scoop:scoop.core:0.1.0

use

function use

source · line 63
public
public suspend fun <T : Disposable, R> T.use(block: suspend (T) -> R): R

Extension receiver: T

Runs the block and always disposes the receiver on exit, including exceptional exit. If both body and cleanup fail, throws ResourceUseException containing both failures.

function use

source · line 44
public
public fun <T : Disposable, R> T.use(block: (T) -> R): R

Extension receiver: T

Runs the block and always disposes the receiver on exit, including exceptional exit. If both body and cleanup fail, throws ResourceUseException containing both failures.