Struct wayland_commons::map::Object [−][src]
pub struct Object<Meta: ObjectMetadata> { pub interface: &'static str, pub version: u32, pub requests: &'static [MessageDesc], pub events: &'static [MessageDesc], pub meta: Meta, pub childs_from_events: fn(_: u16, _: u32, _: &Meta) -> Option<Object<Meta>>, pub childs_from_requests: fn(_: u16, _: u32, _: &Meta) -> Option<Object<Meta>>, }
The representation of a protocol object
Fields
interface: &'static str
Interface name of this object
version: u32
Version of this object
requests: &'static [MessageDesc]
Description of the requests of this object
events: &'static [MessageDesc]
Description of the events of this object
meta: Meta
Metadata associated to this object (ex: its event queue client side)
childs_from_events: fn(_: u16, _: u32, _: &Meta) -> Option<Object<Meta>>
A function which, from an opcode, a version, and the Meta, creates a child object associated with this event if any
childs_from_requests: fn(_: u16, _: u32, _: &Meta) -> Option<Object<Meta>>
A function which, from an opcode, a version, and the Meta, creates a child object associated with this request if any
Methods
impl<Meta: ObjectMetadata> Object<Meta>
[src]
impl<Meta: ObjectMetadata> Object<Meta>
pub fn from_interface<I: Interface>(version: u32, meta: Meta) -> Object<Meta>
[src]
pub fn from_interface<I: Interface>(version: u32, meta: Meta) -> Object<Meta>
Create an Object corresponding to given interface and version
pub fn event_child(&self, opcode: u16) -> Option<Object<Meta>>
[src]
pub fn event_child(&self, opcode: u16) -> Option<Object<Meta>>
Create an optional Object
corresponding to the possible new_id
associated
with given event opcode
pub fn request_child(&self, opcode: u16) -> Option<Object<Meta>>
[src]
pub fn request_child(&self, opcode: u16) -> Option<Object<Meta>>
Create an optional Object
corresponding to the possible new_id
associated
with given request opcode
pub fn is_interface<I: Interface>(&self) -> bool
[src]
pub fn is_interface<I: Interface>(&self) -> bool
Check whether this object is of given interface
Trait Implementations
impl<Meta: Clone + ObjectMetadata> Clone for Object<Meta>
[src]
impl<Meta: Clone + ObjectMetadata> Clone for Object<Meta>