function use
source · line 63public
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.
type parameter T
source · line 63public
T : Disposable
Extensions
public suspend fun <T : Disposable, R> T.use(block: suspend (T) -> R): R· scoop:scoop.core:0.1.0
type parameter R
source · line 63public
R
parameter block
source · line 63public
block: suspend (T) -> R
parameter receiver
source · line 63public
T