A as API User
I want to register a progress update callback hook
So that I can easily implement a progress bar
Acceptance Criteria
- The hook should be a simple function
- The hook should accept a f32 argument that indicates the progress, with range
0..1
- The hook should accept a argument that allows to cancel and interrupt the process
Example
This is the progress update callback that I want to register:
fn progress_update(progress: f32, should_cancel: &mut bool) {
// let's print the current progress as percent 0..100
println!("Current Progress: {}", (progress * 100.0).floor());
// let's cancel the progress
*should_cancel = true;
}
A as API User
I want to register a progress update callback hook
So that I can easily implement a progress bar
Acceptance Criteria
0..1Example
This is the progress update callback that I want to register: