trait EffectTunnel[F[_], G[_]] extends AnyRef

Type class for disguising the effect of F in the effect of G temporarily so that F's effect can tunnel through an API that supports only G.

For example, let F be com.digitalasset.canton.lifecycle.FutureUnlessShutdown, and G be scala.concurrent.Future (see com.digitalasset.canton.tracing.EffectTunnel.effectTunnelFutureUnlessShutdown). Then we can enter the tunnel G by converting com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdowns into a dedicated exception in a failed scala.concurrent.Future and exit the tunnel again by converting the exception back into com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown. This obviously assumes that the API that supports only scala.concurrent.Future does not interact with the dedicated exception.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EffectTunnel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def enter[A](fa: F[A]): G[A]

    Converts the effect F into the effect G.

    Converts the effect F into the effect G. Must be the right-inverse of exit, i.e., exit(enter(fa)) == fa.

  2. abstract def exit[A](fa: G[A]): F[A]

    Converts the effect G into the effect F.

    Converts the effect G into the effect F. Must be the left-inverse of enter, i.e., exit(enter(fa)) == fa.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[H[_]](tunnel: EffectTunnel[G, H]): EffectTunnel[F, H]

    Composes this effect tunnel with another effect tunnel.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def exitK: ~>[G, F]

    exit as an arrow

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped