Trait rama::http::layer::retry::managed::RetryRule

pub trait RetryRule<S, R, E>: Sealed<(S, R, E)> + Send + Sync + 'static {
    // Required method
    fn retry(
        &self,
        ctx: Context<S>,
        result: Result<R, E>,
    ) -> impl Future<Output = (Context<S>, Result<R, E>, bool)> + Send;
}
Expand description

A trait that is used to umbrella-cover all possible implementation kinds for the retry rule functionality.

Required Methods§

fn retry( &self, ctx: Context<S>, result: Result<R, E>, ) -> impl Future<Output = (Context<S>, Result<R, E>, bool)> + Send

Check if the given result should be retried.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<F, Fut, S, R, E> RetryRule<S, R, E> for F
where F: Fn(Context<S>, Result<R, E>) -> Fut + Send + Sync + 'static, Fut: Future<Output = (Context<S>, Result<R, E>, bool)> + Send + 'static, S: Send + Sync + 'static, R: Send + 'static, E: Send + Sync + 'static,

§

impl<S, Body, E> RetryRule<S, Response<Body>, E> for Undefined
where S: Send + Sync + 'static, E: Debug + Send + Sync + 'static, Body: Send + 'static,