Skip to main content

Crate tokio_immediate_egui

Crate tokio_immediate_egui 

Source
Expand description

egui integration for tokio_immediate.

EguiAsync manages AsyncViewports automatically using an egui::Plugin, so you only need to create it once, register the plugin, and then call its factory methods to obtain AsyncCall instances, AsyncWakers, or trigger::AsyncTriggers.

Most factory methods come in three viewport-targeting variants:

SuffixTarget viewport
*_for_root()ViewportId::ROOT
*() (no suffix)The current viewport (ctx.viewport_id())
*_for(viewport_id)An explicit ViewportId

§Feature flags

Re-exports§

pub use ::tokio_immediate::tokio;

Modules§

parallel
Async parallel runner: schedule futures to run concurrently. Async parallel runner: execute submitted futures concurrently.
serialsync
Async serial runner: schedule futures to run one after another. Async serial runner: execute submitted futures one after another.
single
Async call: spawn one Future and track its result. Async call: spawn one Future and track its result.
syncsync
Wrappers around tokio::sync primitives that wake up viewports on send.
triggersync
A notification channel for signaling async tasks from the UI thread.

Structs§

AsyncCurrentRuntime
The default AsyncRuntime for AsyncCall.
AsyncViewport
Represents a single GUI viewport (window) that can be woken up from asynchronous tasks.
AsyncWakeUpGuard
RAII guard that wakes up on drop.
AsyncWaker
A lightweight, cloneable handle that can request a repaint of the AsyncViewport it was created from.
AsyncWakerList
A thread-safe collection of AsyncWakers that can all be woken up at once.
EguiAsync
Manages AsyncViewports for all egui viewports via a Plugin.
EguiAsyncPlugin
The Plugin half of EguiAsync.

Traits§

AsyncRuntime
Abstraction over how AsyncCall accesses a Tokio runtime.
AsyncWakeUp
Common interface for types that can request a viewport wake-up.

Type Aliases§

AsyncWakeUpCallback