Struct wayland_server::Client[][src]

pub struct Client { /* fields omitted */ }

A handle to a client connected to your server

There can be several handles referring to the same client

Methods

impl Client
[src]

Create a client from a wayland-server.so pointer

Retrieve a pointer to the underlying wl_client of wayland-server.so

Check whether this client is still connected to the server

Check whether this client handle refers to the same client as an other

Flush the pending events to this client

Kills this client

Does nothing if the client is already dead

Associate an arbitrary payload to this client

The pointer you associate here can be retrieved from any other handle to the same client.

Setting or getting user data is done as an atomic operation. You are responsible for the correct initialization of this pointer, synchronisation of access, and destruction of the contents at the appropriate time.

Retrieve the arbitrary payload associated to this client

See set_user_data for explanations.

Set a destructor for this client

the provided function will be called when the client disconnects or is killed. It's argument is what you would get from calling get_user_data.

Trait Implementations

impl Clone for Client
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for Client

impl !Sync for Client