izumi.functional.bio.impl.MiniBIO
See theMiniBIO companion object
A lightweight dependency-less implementation of the izumi.functional.bio.IO2 interface, analogous in purpose with cats.effect.kernel.SyncIO
Sync-only, not interruptible, not async. This is a very primitive effect type. Prefer ZIO or cats-bio in production.
This is safe to run in a synchronous environment, Use MiniBIO.autoRun to gain access to components polymorphic over izumi.functional.bio.IO2 in a synchronous environment.
final class MyBIOClock[F[+_, +_]: IO2]() {
val nanoTime: F[Nothing, Long] = IO2(System.nanoTime())
}
import MiniBIO.autoRun._
val time: Long = new MyBIOClock().nanoTime
println(time)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
In this article