Trait ProvidesRegistryState

pub trait ProvidesRegistryState: Sized {
    // Required methods
    fn registry(&mut self) -> &mut RegistryState;
    fn runtime_add_global(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        name: u32,
        interface: &str,
        version: u32,
    );
    fn runtime_remove_global(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        name: u32,
        interface: &str,
    );
}
Available on crate feature wayland and Linux only.
Expand description

Trait which asserts a data type may provide a mutable reference to the registry state.

Typically this trait will be required by delegates or RegistryHandler implementations which need to access the registry utilities provided by Smithay’s client toolkit.

Required Methods§

fn registry(&mut self) -> &mut RegistryState

Returns a mutable reference to the registry state.

fn runtime_add_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, version: u32, )

Called when a new global has been advertised by the compositor.

This is not called during initial global enumeration.

fn runtime_remove_global( &mut self, conn: &Connection, qh: &QueueHandle<Self>, name: u32, interface: &str, )

Called when a global has been destroyed by the compositor.

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§