pub enum AxDeviceEnum {
Net(AxNetDevice),
Block(AxBlockDevice),
Display(AxDisplayDevice),
}Expand description
A unified enum that represents different categories of devices.
Variants§
Net(AxNetDevice)
Network card device.
Block(AxBlockDevice)
Block storage device.
Display(AxDisplayDevice)
Graphic display device.
Implementations§
Source§impl AxDeviceEnum
impl AxDeviceEnum
Sourcepub fn from_net(dev: impl NetDriverOps + 'static) -> Self
pub fn from_net(dev: impl NetDriverOps + 'static) -> Self
Constructs a network device.
Sourcepub fn from_block(dev: impl BlockDriverOps + 'static) -> Self
pub fn from_block(dev: impl BlockDriverOps + 'static) -> Self
Constructs a block device.
Sourcepub fn from_display(dev: impl DisplayDriverOps + 'static) -> Self
pub fn from_display(dev: impl DisplayDriverOps + 'static) -> Self
Constructs a display device.
Trait Implementations§
Source§impl BaseDriverOps for AxDeviceEnum
impl BaseDriverOps for AxDeviceEnum
Source§fn device_type(&self) -> DeviceType
fn device_type(&self) -> DeviceType
The type of the device.
Source§fn device_name(&self) -> &str
fn device_name(&self) -> &str
The name of the device.
Auto Trait Implementations§
impl Freeze for AxDeviceEnum
impl !RefUnwindSafe for AxDeviceEnum
impl Send for AxDeviceEnum
impl Sync for AxDeviceEnum
impl Unpin for AxDeviceEnum
impl !UnwindSafe for AxDeviceEnum
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