pub struct VirtualFunction {
pub vf_index: u16,
pub pci_address: PciAddress,
pub enabled: bool,
pub assigned_vm: Option<u32>,
pub state: VfState,
}Expand description
A single Virtual Function instance
Fields§
§vf_index: u16VF index within the PF’s VF space
pci_address: PciAddressPCI address of this VF
enabled: boolWhether this VF is enabled
assigned_vm: Option<u32>VM this VF is assigned to (None = not assigned)
state: VfStateCurrent state
Implementations§
Source§impl VirtualFunction
impl VirtualFunction
Sourcepub fn new(vf_index: u16, pci_address: PciAddress) -> Self
pub fn new(vf_index: u16, pci_address: PciAddress) -> Self
Create a new VF
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if this VF is available for assignment
Trait Implementations§
Source§impl Clone for VirtualFunction
impl Clone for VirtualFunction
Source§fn clone(&self) -> VirtualFunction
fn clone(&self) -> VirtualFunction
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VirtualFunction
impl Debug for VirtualFunction
impl Copy for VirtualFunction
Auto Trait Implementations§
impl Freeze for VirtualFunction
impl RefUnwindSafe for VirtualFunction
impl Send for VirtualFunction
impl Sync for VirtualFunction
impl Unpin for VirtualFunction
impl UnwindSafe for VirtualFunction
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)