Class/Object

com.thoughtworks.dsl.keywords

Using

Related Docs: object Using | package keywords

Permalink

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

dsl for usage of this Using keyword in continuations

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Using
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Keyword
  7. AnyVal
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Using(open: () ⇒ R)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to any2stringadd[Using[R]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Using[R], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to ArrowAssoc[Using[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. final def apply[Domain](handler: (R) ⇒ Domain)(implicit dsl: Dsl[Using[R], Domain, R]): Domain

    Permalink

    An alias to cpsApply.

    An alias to cpsApply.

    Definition Classes
    Keyword
    Annotations
    @inline()
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. final def cpsApply[Domain](handler: (R) ⇒ Domain)(implicit dsl: Dsl[Using[R], Domain, R]): Domain

    Permalink
    Definition Classes
    Keyword
    Annotations
    @inline()
  9. def ensuring(cond: (Using[R]) ⇒ Boolean, msg: ⇒ Any): Using[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to Ensuring[Using[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Using[R]) ⇒ Boolean): Using[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to Ensuring[Using[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Using[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to Ensuring[Using[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Using[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to Ensuring[Using[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to StringFormat[Using[R]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  14. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val open: () ⇒ R

    Permalink
  17. final def unary_!: R

    Permalink
    Definition Classes
    Keyword
    Annotations
    @shift() @compileTimeOnly( ... )
  18. def [B](y: B): (Using[R], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Using[R] to ArrowAssoc[Using[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Keyword[Using[R], R]

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion any2stringadd from Using[R] to any2stringadd[Using[R]]

Inherited by implicit conversion StringFormat from Using[R] to StringFormat[Using[R]]

Inherited by implicit conversion Ensuring from Using[R] to Ensuring[Using[R]]

Inherited by implicit conversion ArrowAssoc from Using[R] to ArrowAssoc[Using[R]]

Ungrouped