Skip to main content

SyncErrorHandler

Trait SyncErrorHandler 

Source
pub trait SyncErrorHandler: Send + Sync {
    // Required method
    fn on_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        error: &'life1 SyncError,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for handling errors that occur during sync operations

Error handlers are called when the sync operation fails, either due to an API error or a sync handler error.

Error handlers are called sequentially in registration order while the sync lock is still held. Implementations should avoid long-running operations and must not call SyncClient::sync (which would deadlock).

Required Methods§

Source

fn on_error<'life0, 'life1, 'async_trait>( &'life0 self, error: &'life1 SyncError, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when a sync operation encounters an error

The error parameter contains the SyncError that caused the sync to fail. This could be an API error or a handler processing error.

Implementors§