cancellable-promise 0.1.0

Cancellable JS promise in Rust
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 29.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 108.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • xtuc

Cancellable JS promise in Rust

Usage

let promise = wasm_bindgen_futures::future_to_promise(async move {
    ...
});

let abort_controller = Box::new(worker::AbortController::default());
let output = cancellable_promise::make(abort_controller.signal(), promise);

// eventually ...

abort_controller.abort();