- Companion
- class
trait Sum
trait Mirror
trait IorFunctions2
trait IorFunctions
class IorInstances
class IorInstances0
class Object
trait Matchable
class Any
Type members
Classlikes
Value members
Inherited methods
Create an Ior
from an Either
.
Create an Ior
from an Either
.
- Value Params
- eab
an
Either
from which theIor
should be created
- Returns
Ior.Left if the
Either
was aLeft
, or Ior.Right if theEither
was aRight
Example:scala> Ior.fromEither(Left(1)) res0: Ior[Int, Nothing] = Left(1) scala> Ior.fromEither(Right('1')) res1: Ior[Nothing, Char] = Right(1)
- Inherited from
- IorFunctions
Create an Ior
from two Options if at least one of them is defined.
Create an Ior
from two Options if at least one of them is defined.
- Value Params
- oa
an element (optional) for the left side of the
Ior
- ob
an element (optional) for the right side of the
Ior
- Returns
None
if bothoa
andob
areNone
. OtherwiseSome
wrapping an Ior.Left, Ior.Right, or Ior.Both ifoa
,ob
, or both are defined (respectively). Example:scala> Ior.fromOptions(Option.empty[String], Option.empty[Int]) res0: Option[Ior[String, Int]] = None scala> Ior.fromOptions(Option.empty[String], Some(42)) res1: Option[Ior[String, Int]] = Some(Right(42)) scala> Ior.fromOptions(Some("Error"), Option.empty[Int]) res2: Option[Ior[String, Int]] = Some(Left(Error)) scala> Ior.fromOptions(Some("Warning"), Some(42)) res3: Option[Ior[String, Int]] = Some(Both(Warning,42))
- Inherited from
- IorFunctions
Implicits
Inherited implicits
implicit def catsDataMonadErrorForIor[A](`evidence$7`: Semigroup[A]): MonadError[[_] =>> Ior[A, _$60], A]
- Inherited from
- IorInstances
implicit def catsDataOrderForIor[A, B](`evidence$1`: Order[A], `evidence$2`: Order[B]): Order[Ior[A, B]]
- Inherited from
- IorInstances
implicit def catsDataParallelForIor[E](E: Semigroup[E]): Aux[[_] =>> Ior[E, _$62], [_] =>> Ior[E, _$63]]
- Inherited from
- IorInstances
implicit def catsDataSemigroupForIor[A, B](`evidence$5`: Semigroup[A], `evidence$6`: Semigroup[B]): Semigroup[Ior[A, B]]
- Inherited from
- IorInstances
implicit def catsDataShowForIor[A, B](`evidence$3`: Show[A], `evidence$4`: Show[B]): Show[Ior[A, B]]
- Inherited from
- IorInstances