object ToResult
- Alphabetic
- By Inheritance
- ToResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit val booleanToResult: ToResult[Unit, Unit, Boolean]
Converts
Boolean
intoResult[Unit, Unit]
Converts
Boolean
intoResult[Unit, Unit]
true
isOk
false is
Err
Examples
>>> Result(true) == Ok.unit true >>> Result(false) == Err.unit true
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- implicit def eitherToResult[E, T]: ToResult[E, T, Either[E, T]]
Converts
Either[E, T]
intoResult[E, T]
Converts
Either[E, T]
intoResult[E, T]
Examples
>>> Result(Right(1)) == Ok(1) true >>> Result(Left("Error")) == Err("Error") true
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit def tryToResult[T]: ToResult[Throwable, T, Try[T]]
Converts
Try[T]
intoResult[Throwable, T]
Converts
Try[T]
intoResult[Throwable, T]
Examples
>>> Result(scala.util.Success(1)) == Ok(1) true >>> val ex: Exception = new Exception("Error") >>> Result(scala.util.Failure(ex)) == Err(ex) true
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated