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§
Required Methods§
Sourcefn into_gem_obj(&self) -> &Opaque<drm_gem_object>
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.
Sourcefn from_gem_obj(obj: *mut drm_gem_object) -> *mut Self
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.