pub struct DrmNode { /* private fields */ }
Expand description
A node which refers to a DRM device.
Implementations§
Source§impl DrmNode
impl DrmNode
Sourcepub fn from_file<A: AsFd>(file: A) -> Result<DrmNode, CreateDrmNodeError>
pub fn from_file<A: AsFd>(file: A) -> Result<DrmNode, CreateDrmNodeError>
Creates a DRM node from an open drm device.
Sourcepub fn from_path<A: AsRef<Path>>(path: A) -> Result<DrmNode, CreateDrmNodeError>
pub fn from_path<A: AsRef<Path>>(path: A) -> Result<DrmNode, CreateDrmNodeError>
Creates a DRM node from path.
Sourcepub fn from_stat(stat: Stat) -> Result<DrmNode, CreateDrmNodeError>
pub fn from_stat(stat: Stat) -> Result<DrmNode, CreateDrmNodeError>
Creates a DRM node from a file stat.
Sourcepub fn from_dev_id(dev: dev_t) -> Result<Self, CreateDrmNodeError>
pub fn from_dev_id(dev: dev_t) -> Result<Self, CreateDrmNodeError>
Creates a DRM node from a [dev_t
].
Sourcepub fn dev_path_with_type(&self, ty: NodeType) -> Option<PathBuf>
pub fn dev_path_with_type(&self, ty: NodeType) -> Option<PathBuf>
Returns the path of the specified node type matching the device, if available.
Sourcepub fn node_with_type(
&self,
ty: NodeType,
) -> Option<Result<DrmNode, CreateDrmNodeError>>
pub fn node_with_type( &self, ty: NodeType, ) -> Option<Result<DrmNode, CreateDrmNodeError>>
Returns a new node of the specified node type matching the device, if available.
Sourcepub fn has_render(&self) -> bool
pub fn has_render(&self) -> bool
Returns whether the DRM device has render nodes.
Trait Implementations§
impl Copy for DrmNode
impl Eq for DrmNode
impl StructuralPartialEq for DrmNode
Auto Trait Implementations§
impl Freeze for DrmNode
impl RefUnwindSafe for DrmNode
impl Send for DrmNode
impl Sync for DrmNode
impl Unpin for DrmNode
impl UnwindSafe for DrmNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more