Trait wayland_commons::MessageGroup [] [src]

pub trait MessageGroup: Sized {
    fn is_destructor(&self) -> bool;
unsafe fn from_raw_c(
        obj: *mut c_void,
        opcode: u32,
        args: *const wl_argument
    ) -> Result<Self, ()>;
fn as_raw_c_in<F, T>(self, f: F) -> T
    where
        F: FnOnce(u32, &mut [wl_argument]) -> T
; }

A group of messages

This represents a group of message that can be serialized on the protocol wire. Typically the set of events or requests of a single interface.

Implementations of this trait are supposed to be generated using the wayland-scanner crate.

Required Methods

Whether this message is a destructor

If it is, once send or receive the associated object cannot be used any more.

Construct a message of this group from its C representation

Build a C representation of this message

It can only be accessed from the provided closure, and this consumes the message.

Implementors