pub struct DisplayHandle { /* private fields */ }
Expand description

A handle to the Wayland display

A display handle may be constructed from a Handle using it’s From implementation.

Implementations

Returns the underlying Handle from wayland-backend.

Insert a new client in your Display

This client will be associated with the provided ClientData, that you can then retrieve from it via Client::get_data(), and its requests will be processed by the Display and your callbacks.

Retrieve the Client which owns the object represented by the given ID

Create a new protocol global

This global will be advertized to clients through the wl_registry according to the rules defined by your GlobalDispatch implementation for the given interface. Whenever a client binds this global, the associated GlobalDispatch::bind() method will be invoked on your State.

Disable this global

Clients will be notified of the global removal, and it will not be advertized to new clients. However the state associated with this global is not freed, so clients which already know about it can still bind it.

Remove this global

Clients will be notified of the global removal if it was not already disabled. The state associated with this global is freed, meaning clients trying to bind it will receive a protocol error.

When removing a global, it is recommended to first disable it using disable_global() to allow some time for clients to register that the global is getting removed, to avoid a race where a client would be killed because it bound a global at the same as the server decided to remove it. After the global has been disabled for some time (like a few seconds) it should be safe to actually remove it.

Access the protocol information for a Wayland object

Returns an error if the object is no longer valid.

Send an event to given Wayland object

This is intended to be a low-level method. You can alternatively use the methods on the type representing your object, or Resource::send_event(), which may be more convenient.

Trigger a protocol error on this object

This is intended to be a low-level method. See Resource::post_error(), for a more convenient method.

Access the object data associated with this object

This is intended to be a low-level method. See Resource::object_data(), for a more convenient method.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Creates a DisplayHandle using a Handle from wayland-backend.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.