Trait IntoGEMObject

Source
pub trait IntoGEMObject: Sized + Sealed {
    type Driver: Driver;

    // Required methods
    fn into_gem_obj(&self) -> &Opaque<drm_gem_object>;
    fn from_gem_obj(obj: *mut drm_gem_object) -> *mut Self;
}
Expand description

Trait that represents a GEM object subtype

Required Associated Types§

Source

type Driver: Driver

Owning driver for this type

Required Methods§

Source

fn into_gem_obj(&self) -> &Opaque<drm_gem_object>

Returns a reference to the raw drm_gem_object structure, which must be valid as long as this owning object is valid.

Source

fn from_gem_obj(obj: *mut drm_gem_object) -> *mut Self

Converts a pointer to a struct drm_gem_object into a pointer to Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§