# SippoService

sealed class SippoService<out V : Any>

A Sippo service.

This class groups all the methods needed in order to manage an asynchronous result when asking for services that requires certain user capabilities.

#### Parameters

V

Type of the value in case of success.

#### Inheritors

Success
Failure

## Types

Companion
Link copied to clipboard
object Companion
Failure
Link copied to clipboard
class Failure<out E : Any>(val error: Exception) : SippoService<E>

Failed result with error error.

Success
Link copied to clipboard
class Success<out V : Any>(val value: V) : SippoService<V>

Successful result with value value.

## Functions

error
Link copied to clipboard
abstract fun error(): Exception?

Returns the error associated. In case of Success, error will be null.

failure
Link copied to clipboard
fun SippoService<*>.failure(f: (Exception) -> Unit)

Calls the function f with a specific error when Either is failure.

success
Link copied to clipboard
fun <V : Any> SippoService<V>.success(f: (V) -> Unit)

Calls the function f with a specific value when SippoService is successful.

value
Link copied to clipboard
abstract fun value(): V?

Returns the value associated. In case of Failure, value will be null.