IOOps

trait IOOps[R] extends IOBaseOps[R]

Operations for an IO with a fixed R

Companion:
object
trait IOBaseOps[R]
class Object
trait Matchable
class Any
object CanvasIO.type
object MSurfaceIO.type
object SurfaceIO.type
object ResourceIO.type

Value members

Concrete methods

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

Returns a operation that requires this resource.

Returns a operation that requires this resource.

def foreach[A](it: Iterable[A])(f: A => RIO[R, Any]): RIO[R, Unit]

Applies an operation to each element of a Iterable[A] and discards the result.

Applies an operation to each element of a Iterable[A] and discards the result.

def foreach[A](it: () => Iterator[A])(f: A => RIO[R, Any]): RIO[R, Unit]

Applies an operation to each element of a Iterator[A] and discards the result.

Applies an operation to each element of a Iterator[A] and discards the result.

def sequence[A](it: Iterable[RIO[R, A]]): RIO[R, List[A]]

Converts an Iterable[RIO[R, A]] into a RIO[R, List[A]].

Converts an Iterable[RIO[R, A]] into a RIO[R, List[A]].

def sequence_(it: Iterable[RIO[R, Any]]): RIO[R, Unit]

Converts an Iterable[RIO[R, A]] into a RIO[R, Unit].

Converts an Iterable[RIO[R, A]] into a RIO[R, Unit].

def traverse[A, B](it: Iterable[A])(f: A => RIO[R, B]): RIO[R, List[B]]

Converts an Iterable[A] into a RIO[R, List[B]] by applying an operation to each element.

Converts an Iterable[A] into a RIO[R, List[B]] by applying an operation to each element.

def when(predicate: Boolean)(io: => RIO[R, Unit]): RIO[R, Unit]

Runs a computation only if the predicate is true, otherwise does nothing

Runs a computation only if the predicate is true, otherwise does nothing

Inherited methods

def fromCallback[A](operation: Try[A] => Unit => Unit): RIO[R, Poll[A]]

Returns a Poll from a function that receives a callback

Returns a Poll from a function that receives a callback

Inherited from:
IOBaseOps
def pure[A](x: A): RIO[R, A]

Lifts a value into a RIO.

Lifts a value into a RIO.

Inherited from:
IOBaseOps
def suspend[A](x: => A): RIO[R, A]

Suspends a computation into a RIO.

Suspends a computation into a RIO.

Inherited from:
IOBaseOps

Inherited fields

val noop: RIO[R, Unit]

An operation that does nothing.

An operation that does nothing.

Inherited from:
IOBaseOps