[][src]Trait egui::app::Backend

pub trait Backend {
    fn cpu_usage(&self) -> Option<f32>;
fn new_texture_srgba_premultiplied(
        &mut self,
        size: (usize, usize),
        pixels: &[Srgba]
    ) -> TextureId; fn web_info(&self) -> Option<WebInfo> { ... }
fn seconds_since_midnight(&self) -> Option<f64> { ... }
fn quit(&mut self) { ... } }

Required methods

fn cpu_usage(&self) -> Option<f32>

Seconds of cpu usage (in seconds) of UI code on the previous frame. Zero if this is the first frame.

fn new_texture_srgba_premultiplied(
    &mut self,
    size: (usize, usize),
    pixels: &[Srgba]
) -> TextureId

Allocate a user texture (EXPERIMENTAL!)

Loading content...

Provided methods

fn web_info(&self) -> Option<WebInfo>

If the app is running in a Web context, this returns information about the environment.

fn seconds_since_midnight(&self) -> Option<f64>

Local time. Used for the clock in the demo app.

fn quit(&mut self)

Signal the backend that we'd like to exit the app now. This does nothing for web apps.

Loading content...

Implementors

Loading content...