Crates.io | retryable-result |
lib.rs | retryable-result |
version | 0.1.1 |
source | src |
created_at | 2024-07-21 18:27:01.381502 |
updated_at | 2024-10-11 20:48:02.13181 |
description | repeatedly try on some recoverable errors until too many or a fatal error |
homepage | |
repository | https://github.com/Cobord/RetryableResult/ |
max_upload_size | |
id | 1310500 |
size | 38,424 |
Three way enumeration with type for successful values, recoverable errors and nonrecoverable errors.
The recoverable errors must have a way to translate into nonrecoverable errors for the case of getting so many recoverable errors that is just time to give up.
The recoverable errors must also have a way to determine how long to wait given the information of what previous recoverable errors were received and when.
We have an asynchronous function that besides the good results can return recoverable and nonrecoverable errors.
We have another asynchronous function which repeatedly tries this function until either
There are loggers as well. Whenever the final result is an error either through a fatal error on a particular call or just too many recoverable errors, all that error information gets passed to the loggers.