Callback

class Callback<T1 : Any, T2 : Any, T3 : Any>(val singleArg: suspend (T1) -> Unit? = null, val simple: suspend (T1, T2) -> Unit? = null, val withArg: suspend (T1, T2, T3) -> Unit? = null)

Represents a callback function that can be invoked for events.

Parameters

T1

The type of the first parameter in the callback function.

T2

The type of the second parameter in the callback function.

T3

The type of the third parameter in the callback function.

Constructors

Link copied to clipboard
constructor(singleArg: suspend (T1) -> Unit? = null, simple: suspend (T1, T2) -> Unit? = null, withArg: suspend (T1, T2, T3) -> Unit? = null)

Properties

Link copied to clipboard
val simple: suspend (T1, T2) -> Unit? = null

A callback function that accepts two parameters of types T1 and T2.

Link copied to clipboard
val singleArg: suspend (T1) -> Unit? = null

A callback function that accepts one parameter of type T1.

Link copied to clipboard
val withArg: suspend (T1, T2, T3) -> Unit? = null

A callback function that accepts three parameters of types T1, T2, and T3.