interop-cats:cats效果类型类的ZIO实例

时间:2024-03-05 02:51:54
【文件属性】:

文件名称:interop-cats:cats效果类型类的ZIO实例

文件大小:89KB

文件格式:ZIP

更新时间:2024-03-05 02:51:54

Scala

互操作猫效果 该库提供Cats Effect所需的实例。 ZIO Cats Effect实例 ZIO通过根据需要提供IO的ConcurrentEffect实例,例如fs2 , doobie和http4s与Typelevel库集成。 实际上,我撒了点谎,因为ConcurrentEffect扩展了Throwable MonadError ,所以无法对任何错误类型实现ConcurrentEffect 。 为了方便起见,我们将别名定义如下: type Task [ A ] = IO [ Throwable , A ] 因此,我们提供了ConcurrentEffect[Task]的实例。 并发效果 为了获得ConcurrentEffect[Task]或ConcurrentEffect[RIO[R, *]]我们需要范围内的隐式Runtime[R] 。 最简单的方法是使用ZIO.runtime


【文件预览】:
interop-cats-master
----sbt(23KB)
----CLA.md(8KB)
----core-only-test()
--------shared()
----.github()
--------release-drafter.yml(417B)
--------workflows()
--------CODEOWNERS(109B)
----LICENSE(11KB)
----build.sbt(4KB)
----.gitignore(119B)
----.sbtopts(101B)
----project()
--------BuildHelper.scala(5KB)
--------plugins.sbt(992B)
--------build.properties(18B)
----interop-cats()
--------jvm()
--------shared()
----README.md(3KB)
----.gitattributes(22B)
----.scalafmt.conf(350B)

网友评论