Skip to main content

ProjectionRetrySleeper

Trait ProjectionRetrySleeper 

Source
pub trait ProjectionRetrySleeper:
    Debug
    + Send
    + Sync {
    // Required method
    fn sleep(
        &self,
        duration: Duration,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>;
}
Expand description

Asynchronous delay used between transactional projection retry attempts.

Applications normally use the default Tokio-backed implementation. The abstraction permits deterministic observation of requested retry delays without pausing the Tokio runtime that also drives live database I/O.

Required Methods§

Source

fn sleep( &self, duration: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

Returns a future that completes after the requested retry delay.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§