Trait Driver

Source
pub trait Driver {
    type Data: Sync + Send;
    type Object: AllocImpl;
    type File: DriverFile;

    const USE_VTABLE_ATTR: ();
    const INFO: DriverInfo;
    const IOCTLS: &'static [DrmIoctlDescriptor];
}
Expand description

The DRM Driver trait.

This trait must be implemented by drivers in order to create a struct drm_device and struct drm_driver to be registered in the DRM subsystem.

Required Associated Constants§

Source

const USE_VTABLE_ATTR: ()

A marker to prevent implementors from forgetting to use #[vtable] attribute when implementing this trait.

Source

const INFO: DriverInfo

Driver metadata

Source

const IOCTLS: &'static [DrmIoctlDescriptor]

IOCTL list. See kernel::drm::ioctl::declare_drm_ioctls!{}.

Required Associated Types§

Source

type Data: Sync + Send

Context data associated with the DRM driver

Source

type Object: AllocImpl

The type used to manage memory for this driver.

Source

type File: DriverFile

The type used to represent a DRM File (client)

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§