Add WellknownRetrieverResul.upToDateDataOrNull helper function for the enterprise module

This commit is contained in:
Jorge Martín
2026-08-10 14:27:41 +02:00
committed by Jorge Martin Espinosa
parent b9afbf0692
commit 89908c2511
@@ -35,4 +35,11 @@ sealed interface WellknownRetrieverResult<out T> {
is Error -> null
NotFound -> null
}
fun upToDateDataOrNull(): T? = when (this) {
is Success<T> -> data
is Outdated<T> -> null
is Error -> null
NotFound -> null
}
}