c

tofu.syntax

TofuBracketOps

final class TofuBracketOps[F[_], A] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TofuBracketOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TofuBracketOps(fa: F[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bracketAlways[B, C](use: (A) ⇒ F[B])(release: (A) ⇒ F[C])(implicit FG: Guarantee[F]): F[B]

    Apply function to fa with effectful transformation.

    Apply function to fa with effectful transformation. fa is always released

    use

    function to modify value contained in fa

    release

    function to release value contained in fa

    returns

    F[B] updated value

  6. def bracketIncomplete[B, C](use: (A) ⇒ F[B])(release: (A) ⇒ F[C])(implicit F: Applicative[F], FG: Guarantee[F]): F[B]

    Apply function to fa with effectful transformation.

    Apply function to fa with effectful transformation. In case of error or cancellation fa is released

    use

    function to modify value contained in fa

    release

    function to release value contained in fa

    returns

    F[B] updated value

  7. def bracketOpt[B, C](use: (A) ⇒ F[B])(release: (A, Boolean) ⇒ F[C])(implicit FG: Guarantee[F]): F[B]

    Use value contained in fa.

    Use value contained in fa. release is guaranteed to be called

    use

    function to modify value contained in fa

    release

    function to release value contained in fa

    returns

    F[B] updated value

  8. def bracketReplace[B](use: (A) ⇒ F[A])(commit: (A) ⇒ F[B])(implicit FG: Guarantee[F], A: Applicative[F]): F[A]

    Replace value in fa.

    Replace value in fa. In case of error or cancellation old value of fa is passed to commit, otherwise result of use is passed.

    use

    function to modify value contained in fa

    commit

    function to commit passed value

    returns

    F[A] updated value

  9. def bracketState[B, C](use: (A) ⇒ F[(A, B)])(commit: (A) ⇒ F[C])(implicit FG: Guarantee[F], A: Applicative[F]): F[B]

    Update value in fa while producing additional one.

    Update value in fa while producing additional one. In case of error or cancellation old value of fa is passed to commit, otherwise result of use is passed.

    use

    function to modify value contained in fa and produce additional one

    commit

    function to commit passed value

    returns

    F[B] result of use

  10. val fa: F[A]
  11. def finallyCase[Ex[_], B, C](use: (A) ⇒ F[B])(release: (A, Ex[B]) ⇒ F[C])(implicit FG: Finally[F, Ex]): F[B]

    Update value in fa and then release with respect to exit cause.

    Update value in fa and then release with respect to exit cause.

    use

    function to modify value contained in fa

    release

    function to release value depending on exit cause

    returns

    F[B] modified value

  12. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  13. def guaranteeAlways[B](release: F[B])(implicit F: Applicative[F], FG: Guarantee[F]): F[A]

    Guarantee finalization of fa.

    Guarantee finalization of fa. release is alwyas called

    release

    function to release value contained in fa

    returns

    F[A] updated value

  14. def guaranteeIf[B](fb: (Boolean) ⇒ F[B])(implicit FG: Guarantee[F], F: Applicative[F]): F[A]
  15. def guaranteeIncomplete[B](release: F[B])(implicit F: Applicative[F], FG: Guarantee[F]): F[A]

    Guarantee finalization of fa.

    Guarantee finalization of fa. release is called in case of error or cancellation

    release

    function to release value contained in fa

    returns

    F[B] updated value

  16. def guaranteeOpt[B](release: (Boolean) ⇒ F[B])(implicit F: Applicative[F], FG: Guarantee[F]): F[A]

    Guarantee finalization of fa.

    Guarantee finalization of fa. release is always called and boolean indicating success of usage is passed to it

    release

    function to release value contained in fa depending on success of usage

    returns

    F[A] updated value

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped