#[non_exhaustive]pub enum Request<'a> {
Destroy,
SetSandboxEngine {
name: String,
},
SetAppId {
app_id: String,
},
SetInstanceId {
instance_id: String,
},
Commit,
}
staging
and client
only.Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Destroy
destroy the security context object
Destroy the security context object.
This is a destructor, once sent this object cannot be used any longer.
SetSandboxEngine
set the sandbox engine
Attach a unique sandbox engine name to the security context. The name should follow the reverse-DNS style (e.g. “org.flatpak”).
A list of well-known engines is maintained at: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
It is a protocol error to call this request twice. The already_set error is sent in this case.
SetAppId
set the application ID
Attach an application ID to the security context.
The application ID is an opaque, sandbox-specific identifier for an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
The compositor may use the application ID to group clients belonging to the same security context application.
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set error is sent in this case.
SetInstanceId
set the instance ID
Attach an instance ID to the security context.
The instance ID is an opaque, sandbox-specific identifier for a running instance of an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md
Whether this request is optional or not depends on the sandbox engine used.
It is a protocol error to call this request twice. The already_set error is sent in this case.
Commit
register the security context
Atomically register the new client and attach the security context metadata.
If the provided metadata is inconsistent or does not match with out of band metadata (see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md), the invalid_metadata error may be sent eventually.
It’s a protocol error to send any request other than “destroy” after this request. In this case, the already_used error is sent.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.