[−][src]Struct wayland_server::Client
A handle to a client connected to your server
There can be several handles referring to the same client.
Implementations
impl Client
[src]
pub fn alive(&self) -> bool
[src]
Checks whether this client is still connected to the server
pub fn equals(&self, other: &Client) -> bool
[src]
Checks whether self
and other
refer to the same client
pub fn flush(&self)
[src]
Flushes the pending events to this client
pub fn kill(&self)
[src]
Kills this client
Does nothing if the client is already dead.
pub fn data_map(&self) -> &UserDataMap
[src]
Returns a reference to the UserDataMap
associated with this client
See UserDataMap
documentation for details about its use.
pub fn add_destructor(&self, destructor: Filter<Arc<UserDataMap>>)
[src]
Adds a destructor for this client
This filter will be called when the client disconnects or is killed.
It has access to the UserDataMap
associated with this client.
You can add several destructors which will all be called sequentially. Note that if you accidentally add two copies of the same closure, it will be called twice.
The destructors will be executed on the thread containing the wayland event loop.
Panics: This function will panic if called from an other thread than the one hosting the Display.
pub fn create_resource<I: Interface + From<Resource<I>> + AsRef<Resource<I>>>(
&self,
version: u32
) -> Option<Main<I>>
[src]
&self,
version: u32
) -> Option<Main<I>>
Creates a new resource for this client
To ensure the state coherence between client and server, this resource should immediately be assigned to a filter and sent to the client through an appropriate event. Failure to do so will likely cause protocol errors.
Panics: This function will panic if called from an other thread than the one hosting the Display.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,