Documentation / dataflow-async / com.femastudios.dataflow.async / AttributeData
Go to reference

AttributeData

sealed class AttributeData<out T>

This class represents the content of an Attribute. It is empty and cannot be directly instantiated. This is a sealed class, that has only to descendants: Loaded and NotLoaded.

See also online doc

Functions

asField

Returns a constant Field that contains this AttributeData

open fun asField(): Field<AttributeData<T>>

Companion Object Functions

errorInstance

Returns an Error instance with the specified parameters.

fun errorInstance(displayableMessage: String? = null, displayableDescription: String? = null, retry: (() -> Unit)? = null): Error<Nothing>

loadedInstance

Returns a Loaded instance that contains the specified value. For performance reasons, some common values like true or 0 may return the same constant Loaded instance.

fun <T> loadedInstance(value: T): Loaded<T>

loadingFieldInstance

Returns a Field that contains a Loading instance.

fun loadingFieldInstance(): Field<Loading<Nothing>>

loadingInstance

Returns a Loading instance

fun loadingInstance(): Loading<Nothing>

Inheritors

Loaded

This class is one of the extensions of AttributeData and is used to represent a loaded state.

data class Loaded<out T> : AttributeData<T>

NotLoaded

This class is one of the extensions of AttributeData and is used to represent any state that is not loaded. This is also a sealed class and cannot be directly instantiated. The only two descendants are Error and Loading.

sealed class NotLoaded<out T> : AttributeData<T>