Struct smithay::wayland::compositor::SurfaceData
source · pub struct SurfaceData {
pub role: Option<&'static str>,
pub data_map: UserDataMap,
pub cached_state: MultiCache,
}
Available on crate feature
wayland_frontend
only.Expand description
The state container associated with a surface
This general-purpose container provides 2 main storages:
- the
data_map
storage has typemap semantics and allows you to associate and access non-buffered data to the surface - the
cached_state
storages allows you to associate state to the surface that follows the double-buffering semantics associated with thecommit
procedure of surfaces, also with typemap-like semantics
See the respective documentation of each container for its usage.
By default, all surfaces have a SurfaceAttributes
cached state,
and subsurface also have a SubsurfaceCachedState
state as well.
Fields§
§role: Option<&'static str>
The current role of the surface.
If None
if the surface has not yet been assigned a role
data_map: UserDataMap
The non-buffered typemap storage of this surface
cached_state: MultiCache
The double-buffered typemap storage of this surface
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SurfaceData
impl !RefUnwindSafe for SurfaceData
impl Send for SurfaceData
impl !Sync for SurfaceData
impl Unpin for SurfaceData
impl !UnwindSafe for SurfaceData
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
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.