cancellable-promise 0.1.0

Cancellable JS promise in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Cancellable JS promise in Rust

## Usage

```rust
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();
```