pub struct DeviceResources(/* private fields */);Expand description
Newtype to store a set of device resources.
Implementations§
Source§impl DeviceResources
impl DeviceResources
Sourcepub fn get_pio_address_ranges(&self) -> Vec<(u16, u16)>
pub fn get_pio_address_ranges(&self) -> Vec<(u16, u16)>
Get the IO port address resources.
Sourcepub fn get_mmio_address_ranges(&self) -> Vec<(u64, u64)>
pub fn get_mmio_address_ranges(&self) -> Vec<(u64, u64)>
Get the Memory Mapped IO address resources.
Sourcepub fn get_legacy_irq(&self) -> Option<u32>
pub fn get_legacy_irq(&self) -> Option<u32>
Get the first legacy interrupt number(IRQ).
Sourcepub fn get_pci_msi_irqs(&self) -> Option<(u32, u32)>
pub fn get_pci_msi_irqs(&self) -> Option<(u32, u32)>
Get information about the first PCI MSI interrupt resource.
Sourcepub fn get_pci_msix_irqs(&self) -> Option<(u32, u32)>
pub fn get_pci_msix_irqs(&self) -> Option<(u32, u32)>
Get information about the first PCI MSIx interrupt resource.
Sourcepub fn get_generic_msi_irqs(&self) -> Option<(u32, u32)>
pub fn get_generic_msi_irqs(&self) -> Option<(u32, u32)>
Get information about the first Generic MSI interrupt resource.
Sourcepub fn get_kvm_mem_slots(&self) -> Vec<u32>
pub fn get_kvm_mem_slots(&self) -> Vec<u32>
Get the KVM memory slots to map memory into the guest.
Sourcepub fn get_mac_address(&self) -> Option<String>
pub fn get_mac_address(&self) -> Option<String>
Get the first resource information for NIC MAC address.
Sourcepub fn get_all_resources(&self) -> &[Resource]
pub fn get_all_resources(&self) -> &[Resource]
Get immutable reference to all the resources.
Trait Implementations§
Source§impl Clone for DeviceResources
impl Clone for DeviceResources
Source§fn clone(&self) -> DeviceResources
fn clone(&self) -> DeviceResources
Returns a duplicate 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 Default for DeviceResources
impl Default for DeviceResources
Source§fn default() -> DeviceResources
fn default() -> DeviceResources
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceResources
impl RefUnwindSafe for DeviceResources
impl Send for DeviceResources
impl Sync for DeviceResources
impl Unpin for DeviceResources
impl UnwindSafe for DeviceResources
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