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:
| Suffix | Target viewport |
|---|---|
*_for_root() | ViewportId::ROOT |
*() (no suffix) | The current viewport (ctx.viewport_id()) |
*_for(viewport_id) | An explicit ViewportId |
§Feature flags
sync— Enable viewport-aware wrappers aroundtokio::syncchannels, atriggernotification channel andserial::AsyncSerialRunner.
Re-exports§
pub use ::tokio_immediate::tokio;
Modules§
- parallel
- Async parallel runner: schedule futures to run concurrently. Async parallel runner: execute submitted futures concurrently.
- serial
sync - Async serial runner: schedule futures to run one after another. Async serial runner: execute submitted futures one after another.
- single
- Async call: spawn one
Futureand track its result. Async call: spawn oneFutureand track its result. - sync
sync - Wrappers around
tokio::syncprimitives that wake up viewports on send. - trigger
sync - A notification channel for signaling async tasks from the UI thread.
Structs§
- Async
Current Runtime - The default
AsyncRuntimeforAsyncCall. - Async
Viewport - Represents a single GUI viewport (window) that can be woken up from asynchronous tasks.
- Async
Wake UpGuard - RAII guard that wakes up on drop.
- Async
Waker - A lightweight, cloneable handle that can request a repaint of the
AsyncViewportit was created from. - Async
Waker List - A thread-safe collection of
AsyncWakers that can all be woken up at once. - Egui
Async - Manages
AsyncViewports for all egui viewports via aPlugin. - Egui
Async Plugin - The
Pluginhalf ofEguiAsync.
Traits§
- Async
Runtime - Abstraction over how
AsyncCallaccesses a Tokio runtime. - Async
Wake Up - Common interface for types that can request a viewport wake-up.