success

fun <T> success(data: T, metadata: Map<String, Any?> = emptyMap()): EncodableResult<T>

Creates a new EncodableResult instance representing a success.

Return

A new EncodableResult instance representing a success.

Parameters

data

The data to be wrapped in the result.

metadata

Optional metadata to be associated with the result.