Trait EventHandler

Source
pub unsafe trait EventHandler {
    const WL_INTERFACE: &'static wl_interface;

    // Required method
    unsafe fn handle_event(
        &self,
        queue: &Queue,
        slf: &UntypedBorrowedProxy,
        opcode: u32,
        args: *mut wl_argument,
    );
}
Expand description

An event handler that can handle raw libwayland events.

§Safety

  • WL_INTERFACE must be a valid wl_interface.

Required Associated Constants§

Source

const WL_INTERFACE: &'static wl_interface

The type of interface that can be handled by this event handler.

Required Methods§

Source

unsafe fn handle_event( &self, queue: &Queue, slf: &UntypedBorrowedProxy, opcode: u32, args: *mut wl_argument, )

Dispatches a raw libwayland event.

§Safety
  • slf must have an interface compatible with WL_INTERFACE.
  • opcode and args must conform to an event of WL_INTERFACE.
  • Any objects contained in args must remain valid for the duration of the call.

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§