Callback

interface Callback<T, U>

Generic callback interface with a generic return types.

Important: This is a Public Preview API. It may be changed or removed at any time.

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.