Skip to main content

BackendRunner

Trait BackendRunner 

Source
pub trait BackendRunner: Send + 'static {
    // Required method
    fn run(
        self: Box<Self>,
        config: AppConfig,
        content: ContentFn,
        lifecycle: LifecycleConfig,
    ) -> Result<AppExit, UiError>;
}
Expand description

Trait for pluggable backend runners.

Implement this trait to integrate a new GUI backend with OxiUI. The trait is object-safe; callers box the implementor and invoke BackendRunner::run.

Required Methods§

Source

fn run( self: Box<Self>, config: AppConfig, content: ContentFn, lifecycle: LifecycleConfig, ) -> Result<AppExit, UiError>

Launch the backend event loop.

This call blocks until the event loop terminates, then returns the exit status or a UiError describing why the backend failed to start.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl BackendRunner for EguiRunner

Available on crate feature egui only.