Skip to content

feat(api): provide a API that has progress callback hooks #117

Description

@sassman

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions