Struct wayland_protocols::wp::drm_lease::v1::client::wp_drm_lease_device_v1::WpDrmLeaseDeviceV1
source · pub struct WpDrmLeaseDeviceV1 {
id: ObjectId,
version: u32,
data: Option<Arc<dyn ObjectData>>,
backend: WeakBackend,
}
Expand description
lease device
This protocol is used by Wayland compositors which act as Direct Rendering Manager (DRM) masters to lease DRM resources to Wayland clients.
The compositor will advertise one wp_drm_lease_device_v1 global for each DRM node. Some time after a client binds to the wp_drm_lease_device_v1 global, the compositor will send a drm_fd event followed by zero, one or more connector events. After all currently available connectors have been sent, the compositor will send a wp_drm_lease_device_v1.done event.
When the list of connectors available for lease changes the compositor will send wp_drm_lease_device_v1.connector events for added connectors and wp_drm_lease_connector_v1.withdrawn events for removed connectors, followed by a wp_drm_lease_device_v1.done event.
The compositor will indicate when a device is gone by removing the global via a wl_registry.global_remove event. Upon receiving this event, the client should destroy any matching wp_drm_lease_device_v1 object.
To destroy a wp_drm_lease_device_v1 object, the client must first issue a release request. Upon receiving this request, the compositor will immediately send a released event and destroy the object. The client must continue to process and discard drm_fd and connector events until it receives the released event. Upon receiving the released event, the client can safely cleanup any client-side resources.
Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension.
See also the Event enum for this interface.
Fields§
§id: ObjectId
§version: u32
§data: Option<Arc<dyn ObjectData>>
§backend: WeakBackend
Implementations§
source§impl WpDrmLeaseDeviceV1
impl WpDrmLeaseDeviceV1
sourcepub fn create_lease_request<U: Send + Sync + 'static, D: Dispatch<WpDrmLeaseRequestV1, U> + 'static>(
&self,
qh: &QueueHandle<D>,
udata: U,
) -> WpDrmLeaseRequestV1
pub fn create_lease_request<U: Send + Sync + 'static, D: Dispatch<WpDrmLeaseRequestV1, U> + 'static>( &self, qh: &QueueHandle<D>, udata: U, ) -> WpDrmLeaseRequestV1
create a lease request object
Creates a lease request object.
See the documentation for wp_drm_lease_request_v1 for details.
sourcepub fn release(&self)
pub fn release(&self)
release this object
Indicates the client no longer wishes to use this object. In response the compositor will immediately send the released event and destroy this object. It can however not guarantee that the client won’t receive connector events before the released event. The client must not send any requests after this one, doing so will raise a wl_display error. Existing connectors, lease request and leases will not be affected.
Trait Implementations§
source§impl Borrow<ObjectId> for WpDrmLeaseDeviceV1
impl Borrow<ObjectId> for WpDrmLeaseDeviceV1
source§impl Clone for WpDrmLeaseDeviceV1
impl Clone for WpDrmLeaseDeviceV1
source§fn clone(&self) -> WpDrmLeaseDeviceV1
fn clone(&self) -> WpDrmLeaseDeviceV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WpDrmLeaseDeviceV1
impl Debug for WpDrmLeaseDeviceV1
source§impl Hash for WpDrmLeaseDeviceV1
impl Hash for WpDrmLeaseDeviceV1
source§impl PartialEq<Weak<WpDrmLeaseDeviceV1>> for WpDrmLeaseDeviceV1
impl PartialEq<Weak<WpDrmLeaseDeviceV1>> for WpDrmLeaseDeviceV1
source§impl PartialEq for WpDrmLeaseDeviceV1
impl PartialEq for WpDrmLeaseDeviceV1
source§fn eq(&self, other: &WpDrmLeaseDeviceV1) -> bool
fn eq(&self, other: &WpDrmLeaseDeviceV1) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Proxy for WpDrmLeaseDeviceV1
impl Proxy for WpDrmLeaseDeviceV1
source§fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
source§fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
source§fn backend(&self) -> &WeakBackend
fn backend(&self) -> &WeakBackend
source§fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
source§fn send_constructor<I: Proxy>(
&self,
req: Self::Request<'_>,
data: Arc<dyn ObjectData>,
) -> Result<I, InvalidId>
fn send_constructor<I: Proxy>( &self, req: Self::Request<'_>, data: Arc<dyn ObjectData>, ) -> Result<I, InvalidId>
source§fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
source§fn inert(backend: WeakBackend) -> Self
fn inert(backend: WeakBackend) -> Self
source§fn parse_event(
conn: &Connection,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Event), DispatchError>
fn parse_event( conn: &Connection, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Event), DispatchError>
source§fn write_request<'a>(
&self,
conn: &Connection,
msg: Self::Request<'a>,
) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
fn write_request<'a>( &self, conn: &Connection, msg: Self::Request<'a>, ) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
impl Eq for WpDrmLeaseDeviceV1
Auto Trait Implementations§
impl Freeze for WpDrmLeaseDeviceV1
impl !RefUnwindSafe for WpDrmLeaseDeviceV1
impl Send for WpDrmLeaseDeviceV1
impl Sync for WpDrmLeaseDeviceV1
impl Unpin for WpDrmLeaseDeviceV1
impl !UnwindSafe for WpDrmLeaseDeviceV1
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.