pub struct DeviceManager { /* private fields */ }Implementations§
Source§impl DeviceManager
impl DeviceManager
pub fn new() -> Self
pub fn register_device( &mut self, device: Device, ) -> Result<Arc<Device>, DeviceError>
pub fn is_minor_used(&self, major: u16, minor: u16) -> bool
pub fn unregister_device(&mut self, name: &str) -> Result<(), DeviceError>
pub fn get_device(&self, name: &str) -> Option<Arc<Device>>
pub fn get_device_by_major_minor( &self, major: u16, minor: u16, ) -> Option<Arc<Device>>
pub fn get_devices_by_type(&self, device_type: DeviceType) -> Vec<Arc<Device>>
pub fn list_devices(&self) -> Vec<Arc<Device>>
Trait Implementations§
Source§impl Default for DeviceManager
impl Default for DeviceManager
Source§fn default() -> DeviceManager
fn default() -> DeviceManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceManager
impl !RefUnwindSafe for DeviceManager
impl Send for DeviceManager
impl Sync for DeviceManager
impl Unpin for DeviceManager
impl !UnwindSafe for DeviceManager
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