Trait drm::control::ResourceInfo
[−]
[src]
pub trait ResourceInfo: Clone + Eq { type Handle: ResourceHandle; fn load_from_device<T>(_: &T, _: Self::Handle) -> Result<Self>
where
T: Device; fn handle(&self) -> Self::Handle; }
Information about a resource or object managed by a Device
.
Due to external events such as hot plugging, other tasks, and even buggy
drivers, object information could change at any time. In fact, there are no
guarantees that this resource has existed or will exist at any point in
time. A process should treat a ResourceInfo
as merely a hint to the
current state of the Device
.
Associated Types
type Handle: ResourceHandle
The type of handle used to load this trait.
Required Methods
fn load_from_device<T>(_: &T, _: Self::Handle) -> Result<Self> where
T: Device,
T: Device,
Load the resource from a Device
given its ResourceHandle
fn handle(&self) -> Self::Handle
Get the ResourceHandle
for this resource.
Implementors
impl ResourceInfo for drm::control::connector::Info type Handle = Handle;
impl ResourceInfo for drm::control::encoder::Info type Handle = Handle;
impl ResourceInfo for drm::control::crtc::Info type Handle = Handle;
impl ResourceInfo for drm::control::framebuffer::Info type Handle = Handle;
impl ResourceInfo for drm::control::plane::Info type Handle = Handle;
impl ResourceInfo for drm::control::property::Info type Handle = Handle;