Type Alias SyncCallback

Source
pub type SyncCallback = Arc<dyn Fn(SyncEvent) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Send + Sync>>> + Send + Sync>> + Send + Sync>;
Expand description

Callback type used during sync operations to report progress and allow cancellation.

The callback receives SyncEvent variants and returns a Future that resolves to:

  • Ok(true): Continue the operation.
  • Ok(false): Cancel the operation (results in Error::OperationCancelled).
  • Err(e): Propagate an error from the callback.

Aliased Typeยง

pub struct SyncCallback { /* private fields */ }