Success

kyo.Result$package.Result.Success
object Success

Companion object for Success type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Success.type

Members list

Value members

Concrete methods

def apply[A](value: A): Success[A]

Creates a Success instance.

Creates a Success instance.

Type parameters

A

The type of the successful value

Value parameters

value

The successful value

Attributes

Returns

A Success instance

def unapply[E, A](self: Result[E, A]): Ops[A]

Extracts the value from a Success Result.

Extracts the value from a Success Result.

Type parameters

A

The type of the successful value

E

The type of the error (not used in this case)

Value parameters

self

The Result to extract from

Attributes

Returns

A Maybe containing the successful value, or empty for non-Success Results