object EitherTUtil

Utility functions for the cats cats.data.EitherT monad transformer. https://typelevel.org/cats/datatypes/eithert.html

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

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def condUnitET[F[_]]: CondUnitEitherTPartiallyApplied[F]
  7. def doNotAwait(eitherT: EitherT[Future, _, _], failureMessage: => String, level: Level = Level.ERROR)(implicit executionContext: ExecutionContext, loggingContext: ErrorLoggingContext): Unit

    Discard eitherT and log an error if it does not result in a Right.

    Discard eitherT and log an error if it does not result in a Right. This is useful to document that an EitherT[Future,_,_] is intentionally not being awaited upon.

  8. def doNotAwaitUS(eitherT: EitherT[FutureUnlessShutdown, _, _], message: => String, failLevel: Level = Level.ERROR, shutdownLevel: Level = Level.DEBUG)(implicit executionContext: ExecutionContext, loggingContext: ErrorLoggingContext): Unit
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def fromFuture[E, A](fut: Future[A], errorHandler: (Throwable) => E)(implicit ec: ExecutionContext): EitherT[Future, E, A]

    Construct an EitherT from a possibly failed future.

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def ifThenET[F[_], L](cond: Boolean)(then: => EitherT[F, L, _])(implicit F: Applicative[F]): EitherT[F, L, Unit]

    Lifts an if (cond) then ... else () into the EitherT applicative

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def leftSubflatMap[F[_], A, B, C, BB >: B](x: EitherT[F, A, B])(f: (A) => Either[C, BB])(implicit F: Functor[F]): EitherT[F, C, BB]
  17. def liftFailedFuture[E, A](fut: Future[Either[E, A]], errorHandler: (Throwable) => E)(implicit executionContext: ExecutionContext): EitherT[Future, E, A]

    Lift a failed future into a Left value.

  18. def logOnError[E, R](result: EitherT[Future, E, R], message: String, level: Level = Level.ERROR)(implicit executionContext: ExecutionContext, loggingContext: ErrorLoggingContext): EitherT[Future, E, R]

    Log message if result fails with an exception or results in a Left

  19. def logOnErrorU[E, R](result: EitherT[FutureUnlessShutdown, E, R], message: String, level: Level = Level.ERROR)(implicit executionContext: ExecutionContext, loggingContext: ErrorLoggingContext): EitherT[FutureUnlessShutdown, E, R]

    Log message if result fails with an exception or results in a Left

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. def onErrorOrFailure[A, B](errorHandler: () => Unit)(fn: => EitherT[Future, A, B])(implicit executionContext: ExecutionContext): EitherT[Future, A, B]

    Similar to finallyET but will only call the provided handler if fn returns a left/error or fails.

  24. def onErrorOrFailureUnlessShutdown[A, B](errorHandler: () => Unit)(fn: => EitherT[FutureUnlessShutdown, A, B])(implicit executionContext: ExecutionContext): EitherT[FutureUnlessShutdown, A, B]
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def timed[E, R](timerMetric: Timer)(code: => EitherT[Future, E, R])(implicit executionContext: ExecutionContext): EitherT[Future, E, R]

    Measure time of EitherT-based calls, inspired by upstream com.daml.metrics.Timed.future

  27. def toFuture[L <: Throwable, R](x: EitherT[Future, L, R])(implicit executionContext: ExecutionContext): Future[R]

    Transform an EitherT into a Future.failed on left

    Transform an EitherT into a Future.failed on left

    Comes handy when having to return io.grpc.StatusRuntimeExceptions

  28. def toFutureUnlessShutdown[L <: Throwable, R](x: EitherT[FutureUnlessShutdown, L, R])(implicit executionContext: ExecutionContext): FutureUnlessShutdown[R]
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. def unit[A]: EitherT[Future, A, Unit]
  31. def unitUS[A]: EitherT[FutureUnlessShutdown, A, Unit]
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. object syntax

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