Resource

wvlet.airframe.control.Resource
See theResource companion object
trait Resource[A] extends AutoCloseable

Resource that can be closed.

Attributes

Companion:
object
Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def close(): Unit
def get: A

Concrete methods

def use[U](body: A => U): U

Use the resource within the limited scope. After existing the scope, the resource will be closed

Use the resource within the limited scope. After existing the scope, the resource will be closed

Attributes

def wrapFuture[U](body: A => Future[U])(implicit ec: ExecutionContext): Future[U]

Wrap a Future with this resource. After the future completes, the resource will be closed

Wrap a Future with this resource. After the future completes, the resource will be closed

Attributes