pub type InitCallback = Box<dyn Fn(InitProgressEvent) -> Pin<Box<dyn Future<Output = Result<Option<bool>, Box<dyn Error + Send + Sync>>> + Send + Sync>> + Send + Sync>;Expand description
Callback type used during initialization (init) operations to report progress
and handle interactive prompts.
The callback receives InitProgressEvent variants and returns a Future that resolves to:
- Ok(Some(true)): User confirmed action (e.g., create remote index).
- Ok(Some(false)): User denied action.
- Ok(None): Event acknowledged, no specific user action required.
- Err(e): Propagate an error from the callback.
Aliased Typeยง
struct InitCallback(/* private fields */);