Trait

sttp.monad

MonadError

Related Doc: package monad

Permalink

trait MonadError[F[_]] extends AnyRef

A basic monad interface, allowing abstract manipulation of effectful values, represented using the type constructor F.

A computation yielding results of type T is represented as a value of type F[T]. Such values: * can be transformed using map * can be run in sequence using flatMap * errors can be handled using handleError * and new computations can be created using unit, eval and suspend

To use convenient .map, .flatMap syntax, make sure an implicit instance of MonadError is in scope, and import: import sttp.monad.syntax._. This adds the appropriate extension methods.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MonadError
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def ensure[T](f: F[T], e: ⇒ F[Unit]): F[T]

    Permalink
  2. abstract def error[T](t: Throwable): F[T]

    Permalink
  3. abstract def flatMap[T, T2](fa: F[T])(f: (T) ⇒ F[T2]): F[T2]

    Permalink
  4. abstract def handleWrappedError[T](rt: F[T])(h: PartialFunction[Throwable, F[T]]): F[T]

    Permalink
    Attributes
    protected
  5. abstract def map[T, T2](fa: F[T])(f: (T) ⇒ T2): F[T2]

    Permalink
  6. abstract def unit[T](t: T): F[T]

    Permalink

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def eval[T](t: ⇒ T): F[T]

    Permalink
  9. def flatTap[T, U](fa: F[T])(f: (T) ⇒ F[U]): F[T]

    Permalink
  10. def flatten[T](ffa: F[F[T]]): F[T]

    Permalink
  11. def fromTry[T](t: Try[T]): F[T]

    Permalink
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. def handleError[T](rt: ⇒ F[T])(h: PartialFunction[Throwable, F[T]]): F[T]

    Permalink
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. def suspend[T](t: ⇒ F[T]): F[T]

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped