DataSetBuilder

interface DataSetBuilder<in T : Any>

Functions

emit
Link copied to clipboard
common
open suspend fun emit(name: Name, dataSet: DataSet<T>)

Set a current state of given dataSet into a branch name. Does not propagate updates

abstract suspend fun emit(name: Name, data: Data<T>?)
put
Link copied to clipboard
common
open infix suspend fun String.put(block: suspend DataSetBuilder<T>.() -> Unit)

Build and append node

open infix suspend fun String.put(dataSet: DataSet<T>)

Append node

open infix suspend fun String.put(data: Data<T>)

Append data to node

remove
Link copied to clipboard
common
abstract suspend fun remove(name: Name)

Remove all data items starting with name

Properties

dataType
Link copied to clipboard
common
abstract val dataType: KType

Inheritors

ActiveDataTree
Link copied to clipboard

Extensions

emit
Link copied to clipboard
common
suspend fun <T : Any> DataSetBuilder<T>.emit(name: Name, block: suspend DataSetBuilder<T>.() -> Unit)
suspend fun <T : Any> DataSetBuilder<T>.emit(name: String, data: Data<T>)
suspend fun <T : Any> DataSetBuilder<T>.emit(name: String, set: DataSet<T>)
suspend fun <T : Any> DataSetBuilder<T>.emit(name: String, block: suspend DataSetBuilder<T>.() -> Unit)
suspend fun <T : Any> DataSetBuilder<T>.emit(data: NamedData<T>)
meta
Link copied to clipboard
common
suspend fun DataSetBuilder<*>.meta(meta: Meta)
suspend fun DataSetBuilder<*>.meta(mutableMeta: MutableMeta.() -> Unit)

Add meta-data node to a DataSet

populate
Link copied to clipboard
common
suspend fun <T : Any> DataSetBuilder<T>.populate(tree: DataSet<T>)

Update data with given node data and meta with node meta.

suspend fun <T : Any> DataSetBuilder<T>.populate(flow: Flow<NamedData<T>>)
produce
Link copied to clipboard
common
inline suspend fun <T : Any> DataSetBuilder<T>.produce(name: String, meta: Meta = Meta.EMPTY, noinline producer: suspend () -> T)

Produce lazy Data and emit it into the DataSetBuilder

inline suspend fun <T : Any> DataSetBuilder<T>.produce(name: Name, meta: Meta = Meta.EMPTY, noinline producer: suspend () -> T)
static
Link copied to clipboard
common
inline suspend fun <T : Any> DataSetBuilder<T>.static(name: String, data: T, meta: Meta = Meta.EMPTY)

Emit a static data with the fixed value

inline suspend fun <T : Any> DataSetBuilder<T>.static(name: Name, data: T, meta: Meta = Meta.EMPTY)
inline suspend fun <T : Any> DataSetBuilder<T>.static(name: String, data: T, mutableMeta: MutableMeta.() -> Unit)