Enum VirtioDeviceType Copy item path Source pub enum VirtioDeviceType {
Invalid = 0,
Net = 1,
Block = 2,
Console = 3,
Rng = 4,
}
Expand description Device type enum for Virtio devices
This enum represents the different types of Virtio devices.
Each variant corresponds to a specific device type.
The types are defined in the Virtio specification.
Convert from u32 to VirtioDeviceType
This method converts a u32 value to the corresponding VirtioDeviceType variant.
§ Arguments
device_type
- The u32 value to convert.
§ Returns
Returns the corresponding VirtioDeviceType variant.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
[From]<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.