pub struct ClientMatcher(pub u64);Expand description
A client matcher.
Tuple Fields§
§0: u64Implementations§
Source§impl ClientMatcher
impl ClientMatcher
Sourcepub fn bind<F: FnMut(MatchedClient) + 'static>(self, cb: F)
pub fn bind<F: FnMut(MatchedClient) + 'static>(self, cb: F)
Sets a function to execute when the criterion matches a client.
Replaces any already bound callback.
Sourcepub fn set_capabilities(self, caps: ClientCapabilities)
pub fn set_capabilities(self, caps: ClientCapabilities)
Sets the capabilities granted to clients matching this matcher.
If multiple matchers match a client, the capabilities are added.
If no matcher matches a client, it is granted the default capabilities depending
on whether it’s sandboxed or not. If it is not sandboxed, it is granted the
capabilities CC_LAYER_SHELL and CC_DRM_LEASE. Otherwise it is granted the
capability CC_DRM_LEASE.
Regardless of any capabilities set through this function, the capabilities of the client can never exceed its bounding capabilities.
Sourcepub fn set_sandbox_bounding_capabilities(self, caps: ClientCapabilities)
pub fn set_sandbox_bounding_capabilities(self, caps: ClientCapabilities)
Sets the upper capability bounds for clients in sandboxes created by this client.
If multiple matchers match a client, the capabilities are added.
If no matcher matches a client, the bounding capabilities for sandboxes depend on whether the client is itself sandboxed. If it is sandboxed, the bounding capabilities are the effective capabilities of the client. Otherwise the bounding capabilities are all capabilities.
Regardless of any capabilities set through this function, the capabilities set through this function can never exceed the client’s bounding capabilities.
Trait Implementations§
Source§impl Clone for ClientMatcher
impl Clone for ClientMatcher
Source§fn clone(&self) -> ClientMatcher
fn clone(&self) -> ClientMatcher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more