pub enum DeviceType {
Show 23 variants
Net,
Block,
Console,
Rng,
Balloon,
Scsi,
P9,
Gpu,
Input,
Vsock,
Iommu,
Sound,
Fs,
Pmem,
Mac80211HwSim,
VideoEncoder,
VideoDecoder,
Scmi,
Wl,
Tpm,
Pvclock,
Media,
VendorDevice(u32),
}Variants§
Net
Block
Console
Rng
Balloon
Scsi
P9
Gpu
Input
Vsock
Iommu
Sound
Fs
Pmem
Mac80211HwSim
VideoEncoder
VideoDecoder
Scmi
Wl
Tpm
Pvclock
Media
VendorDevice(u32)
Implementations§
Source§impl DeviceType
impl DeviceType
Sourcefn virtio_id(&self) -> u32
fn virtio_id(&self) -> u32
Maps a DeviceType to its virtio ID.
DeviceType cannot be cast directly to a numeric type with ‘as u32’ because of VendorDevice.
Sourcepub fn min_queues(&self) -> usize
pub fn min_queues(&self) -> usize
Returns the minimum number of queues that a device of the corresponding type must support.
Note that this does not mean a driver must activate these queues, only that they must be implemented by a spec-compliant device.
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceType
impl Debug for DeviceType
Source§impl<'de> Deserialize<'de> for DeviceType
impl<'de> Deserialize<'de> for DeviceType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DeviceType
Prints a string representation of the given virtio device type.
impl Display for DeviceType
Prints a string representation of the given virtio device type.
Source§impl From<DeviceType> for u32
impl From<DeviceType> for u32
Source§fn from(val: DeviceType) -> Self
fn from(val: DeviceType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DeviceType
impl PartialEq for DeviceType
Source§impl Serialize for DeviceType
impl Serialize for DeviceType
impl Copy for DeviceType
impl Eq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnwindSafe for DeviceType
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