object ResourceIO extends ResourceIOOps with IOOps[Resource]
- Alphabetic
- By Inheritance
- ResourceIO
- IOOps
- IOBaseOps
- ResourceIOOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def access[A](f: (Resource) => A): RIO[Resource, A]
Returns a operation that requires this resource.
Returns a operation that requires this resource.
- Definition Classes
- IOOps
- def accessResource[A](f: (Resource) => A): ResourceIO[A]
Store an unsafe resource operation in a ResourceIO.
Store an unsafe resource operation in a ResourceIO.
- Definition Classes
- ResourceIOOps
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foreach[A](it: () => Iterator[A])(f: (A) => RIO[Resource, Any]): RIO[Resource, 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.- Definition Classes
- IOOps
- def foreach[A](it: Iterable[A])(f: (A) => RIO[Resource, Any]): RIO[Resource, 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.- Definition Classes
- IOOps
- def fromCallback[A](operation: ((Try[A]) => Unit) => Unit): RIO[Resource, Poll[A]]
Returns a Poll from a function that receives a callback
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val noop: RIO[Resource, Unit]
An operation that does nothing.
An operation that does nothing.
- Definition Classes
- IOBaseOps
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val path: ResourceIO[String]
Path to the resource
Path to the resource
- Definition Classes
- ResourceIOOps
- def pure[A](x: A): RIO[Resource, A]
Lifts a value into a RIO.
- def sequence[A](it: Iterable[RIO[Resource, A]]): RIO[Resource, List[A]]
Converts an
Iterable[RIO[R, A]]into aRIO[R, List[A]].Converts an
Iterable[RIO[R, A]]into aRIO[R, List[A]].- Definition Classes
- IOOps
- def sequence_(it: Iterable[RIO[Resource, Any]]): RIO[Resource, Unit]
Converts an
Iterable[RIO[R, A]]into aRIO[R, Unit].Converts an
Iterable[RIO[R, A]]into aRIO[R, Unit].- Definition Classes
- IOOps
- def suspend[A](x: => A): RIO[Resource, A]
Suspends a computation into a RIO.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[A, B](it: Iterable[A])(f: (A) => RIO[Resource, B]): RIO[Resource, List[B]]
Converts an
Iterable[A]into aRIO[R, List[B]]by applying an operation to each element.Converts an
Iterable[A]into aRIO[R, List[B]]by applying an operation to each element.- Definition Classes
- IOOps
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def when(predicate: Boolean)(io: => RIO[Resource, Unit]): RIO[Resource, 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
- Definition Classes
- IOOps
- def withInputStream[A](f: (InputStream) => A): ResourceIO[Try[A]]
Loads the resource synchronously, processes the contents using a java.io.InputStream and returns the result.
Loads the resource synchronously, processes the contents using a java.io.InputStream and returns the result. The InputStream is closed in the end, so it should not escape this call.
- Definition Classes
- ResourceIOOps
- def withInputStreamAsync[A](f: (InputStream) => A): ResourceIO[Poll[A]]
Loads the resource asynchronously, processes the contents using a java.io.InputStream and returns the result.
Loads the resource asynchronously, processes the contents using a java.io.InputStream and returns the result. The InputStream is closed in the end, so it should not escape this call.
- Definition Classes
- ResourceIOOps
- def withSource[A](f: (Source) => A): ResourceIO[Try[A]]
Loads the resource synchronously, processes the contents using a scala.io.Source and returns the result.
Loads the resource synchronously, processes the contents using a scala.io.Source and returns the result. The Source is closed in the end, so it should not escape this call. For working with binary files, it is recommended to use withInputStream instead.
- Definition Classes
- ResourceIOOps
- def withSourceAsync[A](f: (Source) => A): ResourceIO[Poll[A]]
Loads the resource asynchronously, processes the contents using a scala.io.Source and returns the result.
Loads the resource asynchronously, processes the contents using a scala.io.Source and returns the result. The Source is closed in the end, so it should not escape this call. For working with binary files, it is recommended to use withInputStreamAsync instead.
- Definition Classes
- ResourceIOOps