drm-fourcc 1.3.0

Provides an enum with every valid Direct Rendering Manager (DRM) format fourcc
docs.rs failed to build drm-fourcc-1.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: drm-fourcc-2.2.0

Provides an enum representing every pixel format supported by DRM (as of kernel version 5.8.0).

A fourcc is four bytes of ascii representing some data format. This enum contains every fourcc representing a pixel format supported by DRM, the Linux Direct Rendering Manager.

To get the bytes of the fourcc representing the format, cast to u32.

assert_eq!(DrmFormat::Xrgb8888 as u32, 875713112);

To get the string form of the fourcc, use [DrmFormat::string_form].

assert_eq!(DrmFormat::Xrgb8888.string_form(), "XR24");

The enum is autogenerated from the canonical list in the Linux source code.