Result

utils.Result
See theResult companion enum
object Result

Companion object for Result containing utility methods and extensions.

Attributes

Companion
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Extensions

Extensions

extension [A](result: Result[A, A])
def option(): Option[A]

Converts a Result where both success and error types are the same to an Option. Success values are converted to Some, and Failure values are converted to None.

Converts a Result where both success and error types are the same to an Option. Success values are converted to Some, and Failure values are converted to None.

Attributes

Returns

Some(value) if Success, None if Failure