Trait wayland_client::Proxy[][src]

pub trait Proxy: Sized {
    type Event;
    type Request;
    fn interface() -> &'static Interface;
fn id(&self) -> ObjectId;
fn version(&self) -> u32;
fn data<U: Send + Sync + 'static>(&self) -> Option<&U>;
fn from_id(
        conn: &mut ConnectionHandle<'_>,
        id: ObjectId
    ) -> Result<Self, InvalidId>;
fn parse_event(
        conn: &mut ConnectionHandle<'_>,
        msg: Message<ObjectId>
    ) -> Result<(Self, Self::Event), DispatchError>;
fn write_request(
        &self,
        conn: &mut ConnectionHandle<'_>,
        req: Self::Request
    ) -> Result<Message<ObjectId>, InvalidId>; }
Expand description

Trait representing a Wayland interface

Associated Types

The event enum for this interface

The request enum for this interface

Required methods

The interface description

he ID of this object

The version of this object

Access the user-data associated with this object

Create an object proxy from its ID

Returns an error this the provided object ID does not correspond to the Self interface.

Note: This method is mostly meant as an implementation detail to be used by code generated by wayland-scanner.

Parse a event for this object

Note: This method is mostly meant as an implementation detail to be used by code generated by wayland-scanner.

Serialize a request for this object

Note: This method is mostly meant as an implementation detail to be used by code generated by wayland-scanner.

Implementors