jsbrucker / scala-result   1.0.0

Website GitHub

Rust style Result type for Scala

Scala versions: 2.13 2.12

Scala-Result

Rust style Result type for Scala

Context

In the opinion of the author Either and Try are inferior to the semantic benefits of a dedicated Result type. Unfortunately, prior discussions regarding the addition of a Result type to the standard library have not borne fruit. Pre-SIP: Rust-like "Result" Proposal So we'll have to go a with an unofficial solution.

Documentation

Usage

SBT

Add the following line to the build.sbt files:

libraryDependencies += "dev.jsbrucker" %% "result-core" % "1.0.0"

Bazel (using maven_install)

Add "dev.jsbrucker:result-core_2_13:1.0.0" to the list of artifacts.

Maven

<dependency>
  <groupId>dev.jsbrucker</groupId>
  <artifactId>result-core_2.13</artifactId>
  <version>1.0.0</version>
</dependency>