Trait wayland_server::MessageGroup
source · pub trait MessageGroup: Sized {
type Map;
const MESSAGES: &'static [MessageDesc];
fn opcode(&self) -> u16;
fn is_destructor(&self) -> bool;
fn child<Meta>(opcode: u16, version: u32, meta: &Meta) -> Option<Object<Meta>>
where
Meta: ObjectMetadata;
fn from_raw(msg: Message, map: &mut Self::Map) -> Result<Self, ()>;
fn into_raw(self, send_id: u32) -> Message;
}
Expand description
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 Associated Types
Required Associated Constants
sourceconst MESSAGES: &'static [MessageDesc]
const MESSAGES: &'static [MessageDesc]
Wire representation of this MessageGroup
Required Methods
sourcefn is_destructor(&self) -> bool
fn is_destructor(&self) -> bool
Whether this message is a destructor
If it is, once send or receive the associated object cannot be used any more.
sourcefn child<Meta>(opcode: u16, version: u32, meta: &Meta) -> Option<Object<Meta>>where
Meta: ObjectMetadata,
fn child<Meta>(opcode: u16, version: u32, meta: &Meta) -> Option<Object<Meta>>where
Meta: ObjectMetadata,
Retrieve the child Object
associated with this message if any