[][src]Enum rust_drm::node::DrmNodeType

pub enum DrmNodeType {
    Primary,
    Control,
    Render,
}

Variants

Primary
Control
Render

Methods

impl DrmNodeType[src]

pub fn from_minor_name(name: &str) -> Result<DrmNodeType, Box<dyn Error>>[src]

Examples

DRM Node types:

let node_type = drm::DrmNodeType::from_minor_name("card0").unwrap();
assert_eq!(node_type, drm::DrmNodeType::Primary);

let node_type = drm::DrmNodeType::from_minor_name("controlD128").unwrap();
assert_eq!(node_type, drm::DrmNodeType::Control);

let node_type = drm::DrmNodeType::from_minor_name("renderD128").unwrap();
assert_eq!(node_type, drm::DrmNodeType::Render);

Unknown DRM Node type:

assert!(drm::DrmNodeType::from_minor_name("unknownD128").is_err());

Trait Implementations

impl PartialEq<DrmNodeType> for DrmNodeType[src]

impl Debug for DrmNodeType[src]

impl StructuralPartialEq for DrmNodeType[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]