Type Alias GetCallback

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

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

The callback receives GetEvent 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ยง

struct GetCallback { /* private fields */ }