Enum axdriver::AxDeviceEnum
source · pub enum AxDeviceEnum {
Net(AxNetDevice),
Block(AxBlockDevice),
Display(AxDisplayDevice),
}
Expand description
A unified enum that represents different categories of devices.
Variants§
Net(AxNetDevice)
Available on crate feature
net
only.Network card device.
Block(AxBlockDevice)
Available on crate feature
block
only.Block storage device.
Display(AxDisplayDevice)
Available on crate feature
display
only.Graphic display device.
Implementations§
source§impl AxDeviceEnum
impl AxDeviceEnum
sourcepub fn from_net(dev: impl NetDriverOps + 'static) -> Self
Available on crate feature net
only.
pub fn from_net(dev: impl NetDriverOps + 'static) -> Self
net
only.Constructs a network device.
sourcepub fn from_block(dev: impl BlockDriverOps + 'static) -> Self
Available on crate feature block
only.
pub fn from_block(dev: impl BlockDriverOps + 'static) -> Self
block
only.Constructs a block device.
sourcepub fn from_display(dev: impl DisplayDriverOps + 'static) -> Self
Available on crate feature display
only.
pub fn from_display(dev: impl DisplayDriverOps + 'static) -> Self
display
only.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 !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