RIO

sealed trait RIO[-R, +A]

Representation of an effectful operation, based on Haskell's RIO Monad.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def map[B](f: A => B): RIO[R, B]

Maps the result of this operation.

Maps the result of this operation.

def run(resource: R): A

Runs this operation.

Runs this operation.

Concrete methods

def andFinally[RR <: R, B](that: RIO[RR, B]): RIO[RR, A]

Combines two operations by discarding the result of the second operation.

Combines two operations by discarding the result of the second operation.

def andThen[RR <: R, B](that: RIO[RR, B]): RIO[RR, B]

Combines two operations by discarding the result of the first operation.

Combines two operations by discarding the result of the first operation.

def as[B](x: B): RIO[R, B]

Changes the result of this operation to another value.

Changes the result of this operation to another value.

def contramap[RR](f: RR => R): RIO[RR, A]

Transforms the resource required by this operation.

Transforms the resource required by this operation.

def flatMap[RR <: R, B](f: A => RIO[RR, B]): RIO[RR, B]

Combines two operations by applying a function to the result of the first operation.

Combines two operations by applying a function to the result of the first operation.

def provide(res: R): RIO[Any, A]

Provides the required resource to this operation.

Provides the required resource to this operation.

def zip[RR <: R, B](that: RIO[RR, B]): RIO[RR, (A, B)]

Combines two operations by combining their results into a tuple.

Combines two operations by combining their results into a tuple.

def zipWith[RR <: R, B, C](that: RIO[RR, B])(f: (A, B) => C): RIO[RR, C]

Combines two operations by combining their results with the given function.

Combines two operations by combining their results with the given function.

Concrete fields

lazy val unit: RIO[R, Unit]

Changes the result of this operation unit.

Changes the result of this operation unit.