LoanPattern

object LoanPattern extends LoanPattern
Companion
class
class Object
trait Matchable
class Any

Type members

Inherited types

type Closable = { def close(): Unit; }
Inherited from
LoanPattern

Value members

Inherited methods

def futureUsing[R <: Closable, A](resource: R)(f: R => Future[A])(implicit ec: ExecutionContext): Future[A]

Guarantees a Closeable resource will be closed after being passed to a block that takes the resource as a parameter and returns a Future.

Guarantees a Closeable resource will be closed after being passed to a block that takes the resource as a parameter and returns a Future.

Inherited from
LoanPattern
def using[R <: Closable, A](resource: R)(f: R => A): A
Inherited from
LoanPattern