Module tokio_util

Module tokio_util 

Source
Expand description

Helpers for bridging GLib async/mainloop with Tokio.

Structsยง

CancelOnDrop ๐Ÿ”’

Functionsยง

flatten_anyhow ๐Ÿ”’
Flatten a nested Result<Result>, defaulting to converting the error type to an anyhow::Error. See https://doc.rust-lang.org/std/result/enum.Result.html#method.flatten
run_with_cancellable
Call a faillible future, while monitoring cancellable and return an error if cancelled.
spawn_blocking_cancellable
Wrapper for [tokio::task::spawn_blocking] which provides a [gio::Cancellable] that will be triggered on drop.
spawn_blocking_cancellable_flatten
A wrapper around spawn_blocking_cancellable that flattens nested results.
spawn_blocking_flatten
A wrapper around [tokio::task::spawn_blocking] that flattens nested results.