ErrorRecovery
-
Cmn
@VisibleForTesting
enum ErrorRecovery : Enum
The method of recovery when PagingSource returns LoadResult.Error. The error is indicated when PagingDataPresenter.loadStateFlow emits a CombinedLoadStates where one or more of the LoadState is LoadState.Error.
Summary
Enum Values |
|
|---|---|
RETRY |
Retry the failed load. |
RETURN_CURRENT_SNAPSHOT |
Returns a snapshot with any data that has been loaded up till the point of error. |
THROW |
Rethrow the original |
Public functions |
||
|---|---|---|
ErrorRecovery |
Returns the enum constant of this type with the specified name. |
Cmn
|
Array<ErrorRecovery> |
values()Returns an array containing the constants of this enum type, in the order they're declared. |
Cmn
|
Public properties |
||
|---|---|---|
EnumEntries<ErrorRecovery> |
Returns a representation of an immutable list of all enum entries, in the order they're declared. |
Cmn
|
Enum Values
RETRY
@VisibleForTesting
val ErrorRecovery.RETRY: ErrorRecovery
Retry the failed load. This does not guarantee a successful load as the data source may still return an error.
RETURN_CURRENT_SNAPSHOT
@VisibleForTesting
val ErrorRecovery.RETURN_CURRENT_SNAPSHOT: ErrorRecovery
Returns a snapshot with any data that has been loaded up till the point of error.
THROW
@VisibleForTesting
val ErrorRecovery.THROW: ErrorRecovery
Rethrow the original Throwable that was caught when loading from the data source.
Public functions
valueOf
fun valueOf(value: String): ErrorRecovery
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if this enum type has no constant with the specified name |
values
fun values(): Array<ErrorRecovery>
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
Public properties
entries
val entries: EnumEntries<ErrorRecovery>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.