final case class Using[R <: AutoCloseable](open: () ⇒ R) extends AnyVal with Keyword[Using[R], R] with Product with Serializable
This Using keyword automatically manage resources in scala.concurrent.Future, domains.task.Task,
and other asynchrounous domains derived from Future
or Task
.
Author:
杨博 (Yang Bo)
- Source
- Using.scala
- See also
- Alphabetic
- By Inheritance
- Using
- Serializable
- Serializable
- Product
- Equals
- Keyword
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Using(open: () ⇒ R)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
- def +(other: String): String
- def ->[B](y: B): (Using[R], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
apply[Domain](handler: (R) ⇒ Domain)(implicit dsl: Dsl[Using[R], Domain, R]): Domain
An alias to cpsApply.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
cpsApply[Domain](handler: (R) ⇒ Domain)(implicit dsl: Dsl[Using[R], Domain, R]): Domain
- Definition Classes
- Keyword
- Annotations
- @inline()
- def ensuring(cond: (Using[R]) ⇒ Boolean, msg: ⇒ Any): Using[R]
- def ensuring(cond: (Using[R]) ⇒ Boolean): Using[R]
- def ensuring(cond: Boolean, msg: ⇒ Any): Using[R]
- def ensuring(cond: Boolean): Using[R]
- def formatted(fmtstr: String): String
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val open: () ⇒ R
- final def unary_!: R
- def →[B](y: B): (Using[R], B)