Callback

interface Callback<T, U>

Generic callback interface with a generic return types.

Parameters

T

type of the returned object.

U

type of the returned failure.

Functions

Link copied to clipboard
abstract fun onFailure(failure: U)

Called when requested operation failed to succeed.

Link copied to clipboard
abstract fun onSuccess(result: T)

Called when requested operation finished with success.