Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore fn_traits and tuple_trait to see if we can implement some cool #96

Open
Xuanwo opened this issue Aug 22, 2024 · 0 comments
Open

Comments

@Xuanwo
Copy link
Owner

Xuanwo commented Aug 22, 2024

fn_traits and tuple_trait can allow us to implement something like:

impl<B, T, E, Fut, FutureFn, Args> Retryable<B, T, E, Fut, FutureFn> for FutureFn
where
    B: BackoffBuilder,
    Fut: Future<Output = Result<T, E>>,
    FutureFn: FnMut(Args) -> Fut,
    Args: Tuple,
{
    fn retry(self, builder: &B) -> Retry<B::Backoff, T, E, Fut, FutureFn, Args> {
        Retry::new(self, builder.build())
    }
}

We can try to explore so that we can retry a function with args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant