package ru.fincode.tsudesk.core.common.model

sealed interface DataResult<out T> {

    data class Data<T>(
        val data: T,
        val refreshedFromNetwork: Boolean
    ) : DataResult<T>

    data class Error<T>(
        val error: AppError,
        val data: T? = null,
        val cause: Throwable? = null
    ) : DataResult<T>

    data object Loading : DataResult<Nothing>
}