tauri

Module async_runtime

Source
Expand description

The singleton async runtime used by Tauri and exposed to users.

Tauri uses tokio Runtime to initialize code, such as Plugin::initialize and crate::Builder::setup hooks. This module also re-export some common items most developers need from tokio. If there’s one you need isn’t here, you could use types in tokio directly. For custom command handlers, it’s recommended to use a plain async fn command.

Structs§

  • An asynchronous Mutex-like type.
  • Receives values from the associated Sender.
  • An asynchronous reader-writer lock.
  • Sends values to the associated Receiver.
  • Handle to the runtime.
  • An owned permission to join on a task (await its termination).
  • The Tokio runtime.

Enums§

  • An owned permission to join on a task (await its termination).
  • A runtime used to execute asynchronous tasks.
  • A handle to the async runtime

Functions§

  • Runs a future to completion on runtime.
  • Creates a bounded mpsc channel for communicating between asynchronous tasks with backpressure.
  • Returns a handle of the async runtime.
  • Sets the runtime to use to execute asynchronous tasks. For convenience, this method takes a TokioHandle. Note that you cannot drop the underlying TokioRuntime.
  • Spawns a future onto the runtime.
  • Runs the provided function on an executor dedicated to blocking operations.