Skip to main content

BackendEntry

Trait BackendEntry 

Source
pub trait BackendEntry:
    Copy
    + Debug
    + Send
    + Sync
    + 'static {
    const KIND: &'static str;

    // Required methods
    fn name(&self) -> &'static str;
    fn priority(&self) -> i32;
}
Expand description

What a registry entry tells the registry about the backend it names.

Entries are small Copy values (a name, a rank, a constructor function pointer), so a launch takes them out of the registry and builds the backend without holding the world.

Required Associated Constants§

Source

const KIND: &'static str

The backend kind, for messages: "render", "layout", "window".

Required Methods§

Source

fn name(&self) -> &'static str

The name the backend is registered and selected under.

Source

fn priority(&self) -> i32

Trial order when nothing names a backend: higher first.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl BackendEntry for LayoutBackend

Source§

const KIND: &'static str = "layout"

Source§

impl BackendEntry for RenderBackend

Source§

const KIND: &'static str = "render"

Source§

impl BackendEntry for WindowBackendEntry

Source§

const KIND: &'static str = "window"