#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct PciDeviceDetails
{
pub vendor_and_device: PciVendorAndDevice,
pub driver: Option<PciDriverName>,
pub directly_associated_network_devices: Option<HashSet<NetworkInterfaceName>>,
pub subsystem_name: Box<[u8]>,
pub subsystem_vendor_and_subsystem_device: PciVendorAndDevice,
#[allow(missing_docs)]
pub class: EitherPciDeviceClass,
#[allow(missing_docs)]
pub revision: Revision,
#[allow(missing_docs)]
pub associated_numa_node: Option<Option<NumaNode>>,
#[allow(missing_docs)]
pub associated_hyper_threads_bit_set: Option<HyperThreads>,
#[allow(missing_docs)]
pub associated_hyper_threads_bitmask: Option<HyperThreads>,
#[allow(missing_docs)]
pub d3cold_allowed: Option<bool>,
#[allow(missing_docs)]
pub interrupt_request: InterruptRequest,
pub current_link_speed_and_width: Option<LinkSpeedAndWidth>,
pub maximum_link_speed_and_width: Option<LinkSpeedAndWidth>,
#[allow(missing_docs)]
pub enabled: bool,
#[allow(missing_docs)]
pub msi_and_msi_x_enabled: bool,
#[allow(missing_docs)]
pub msi_and_msi_x_interrupt_requests: Option<HashMap<InterruptRequest, MsiInterruptMode>>,
#[allow(missing_docs)]
pub alternative_routing_identifier_interpretation_forwarding_enabled: bool,
#[allow(missing_docs)]
pub resource_files: Vec<ResourceFile>,
#[allow(missing_docs)]
pub has_rom: bool,
#[allow(missing_docs)]
pub has_config: bool,
pub boot_vga: bool,
pub bridge: Option<PciBridgeDeviceDetails>,
}
impl PciDeviceDetails
{
#[inline(always)]
pub fn is_ethernet(&self) -> bool
{
self.class == EitherPciDeviceClass(Left(PciDeviceClass::NetworkController(NetworkController::Ethernet)))
}
}