Struct wayland_client::backend::Handle[][src]

pub struct Handle { /* fields omitted */ }
Expand description

Main handle of a backend to the Wayland protocol

This type hosts most of the protocol-related functionality of the backend, and is the main entry point for manipulating Wayland objects. It can be retrieved both from the backend via Backend::handle(), and is given to you as argument in most event callbacks.

Implementations

Get the object ID for the wl_display

Get the last error that occurred on this backend

If this returns an error, your Wayland connection is already dead.

Get the detailed information about a wayland object

Returns an error if the provided object ID is no longer valid.

Create a null object ID

This object ID is always invalid, and can be used as placeholder.

Create a placeholder ID for object creation

This ID needs to be created beforehand and given as argument to a request creating a new object ID. A specification must be specified if the interface and version cannot be inferred from the protocol (for example object creation from the wl_registry).

If a specification is provided it’ll be checked against what can be deduced from the protocol specification, and send_request will panic if they do not match.

Sends a request to the server

Returns an error if the sender ID of the provided message is no longer valid.

Panic:

Several checks against the protocol specification are done, and this method will panic if they do not pass:

  • the message opcode must be valid for the sender interface
  • the argument list must match the prototype for the message associated with this opcode
  • if the method creates a new object, a placeholder_id() must be given in the argument list, either without a specification, or with a specification that matches the interface and version deduced from the protocol rules

Access the object data associated with a given object ID

Returns an error if the object ID is not longer valid

Set the object data associated with a given object ID

Returns an error if the object ID is not longer valid

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.