Skip to content

gfc-collective/gfc-vavr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gfc-vavr Maven Central Build Status Coverage Status

A library that contains utility classes and Scala adapters and adaptations for VAVR.

Getting gfc-vavr

This library is cross-built against Scala 2.12.x, 2.13.x, and Scala 3.0.x

If you're using SBT, add the following line to your build file:

libraryDependencies += "org.gfccollective" %% "gfc-vavr" % "x.y.z"

For Maven and other build tools, you can visit search.maven.org. (This search will also list other available libraries from the GFC Collective.)

Contents and Example Usage

org.gfccollective.vavr.VavrConverters / VavrConversions:

These contain implicit and explicit functions to convert between

  • io.vavr.control.Option and scala.Option
  • io.vavr.control.Either and scala.util.Either
  • io.vavr.control.Try and scala.util.Try
  • io.vavr.concurrent.Future and scala.concurrent.Future
    val foo: Option[String] = ???

    // Explicit conversion Scala Option -> Vavr Option
    import org.gfccollective.vavr.VavrConverters._
    val bar: io.vavr.control.Option[String] = foo.asVavrOption

    // Implicit conversion Vavr Option -> Scala Option
    import org.gfccollective.vavr.VavrConversions._
    val baz: Option[String] = bar

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published