#[non_exhaustive]pub enum Request<'a> {
Destroy,
Remove,
AddToplevel {
toplevel: XdgToplevel,
name: String,
},
RestoreToplevel {
toplevel: XdgToplevel,
name: String,
},
}client only.Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Destroy
Destroy the session
Destroy a session object, preserving the current state but not continuing to make further updates if state changes occur. This makes the associated xx_toplevel_session_v1 objects inert.
This is a destructor, once sent this object cannot be used any longer.
Remove
Remove the session
Remove the session, making it no longer available for restoration. A compositor should in response to this request remove the data related to this session from its storage.
This is a destructor, once sent this object cannot be used any longer.
AddToplevel
add a new surface to the session
Attempt to add a given surface to the session. The passed name is used to identify what window is being restored, and may be used store window specific state within the session.
Calling this with a toplevel that is already managed by the session with the same associated will raise an in_use error.
RestoreToplevel
restore a surface state
Inform the compositor that the toplevel associated with the passed name should have its window management state restored.
Calling this with a toplevel that is already managed by the session with the same associated will raise an in_use error.
This request must be called prior to the first commit on the associated wl_surface, otherwise an already_mapped error is raised.
As part of the initial configure sequence, if the toplevel was successfully restored, a xx_toplevel_session_v1.restored event is emitted. See the xx_toplevel_session_v1.restored event for further details.
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.