package com.example.apretamemm.data /** * A generic class that holds a value with its loading status. * @param */ sealed class Result { data class Success(val data: T) : Result() data class Error(val exception: Exception) : Result() override fun toString(): String { return when (this) { is Success<*> -> "Success[data=$data]" is Error -> "Error[exception=$exception]" } } }