[−][src]Struct wayland_commons::map::Object
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]
pub fn from_interface<I: Interface>(version: u32, meta: Meta) -> Object<Meta>
[src]
Create an Object corresponding to given interface and version
pub fn event_child(&self, opcode: u16) -> Option<Object<Meta>>
[src]
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]
Create an optional Object
corresponding to the possible new_id
associated
with given request opcode
pub fn is_interface<I: Interface>(&self) -> bool
[src]
Check whether this object is of given interface
pub fn placeholder(meta: Meta) -> Object<Meta>
[src]
Create a placeholder object that will be filled-in by the message logic
Trait Implementations
impl<Meta: Clone + ObjectMetadata> Clone for Object<Meta>
[src]
Auto Trait Implementations
impl<Meta> Send for Object<Meta> where
Meta: Send,
Meta: Send,
impl<Meta> Unpin for Object<Meta> where
Meta: Unpin,
Meta: Unpin,
impl<Meta> Sync for Object<Meta> where
Meta: Sync,
Meta: Sync,
impl<Meta> UnwindSafe for Object<Meta> where
Meta: UnwindSafe,
Meta: UnwindSafe,
impl<Meta> RefUnwindSafe for Object<Meta> where
Meta: RefUnwindSafe,
Meta: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,