pub struct DownstreamSwitchPort { /* private fields */ }Expand description
A PCI Express downstream switch port emulator.
A downstream switch port connects a switch to its children (e.g., endpoints or other switches). It appears as a Type 1 PCI-to-PCI bridge with PCIe capability indicating it’s a downstream switch port.
Implementations§
Source§impl DownstreamSwitchPort
impl DownstreamSwitchPort
Sourcepub fn new(
name: impl Into<Arc<str>>,
multi_function: Option<bool>,
hotplug_slot_number: Option<u32>,
) -> Self
pub fn new( name: impl Into<Arc<str>>, multi_function: Option<bool>, hotplug_slot_number: Option<u32>, ) -> Self
Constructs a new DownstreamSwitchPort emulator.
§Arguments
name- The name for this downstream switch portmulti_function- Whether this port should have the multi-function flag set (default: false)hotplug_slot_number- The slot number for hotplug support.Some(slot_number)enables hotplug,Nonedisables it
Sourcepub fn cfg_space(&self) -> &ConfigSpaceType1Emulator
pub fn cfg_space(&self) -> &ConfigSpaceType1Emulator
Get a reference to the configuration space emulator.
Sourcepub fn cfg_space_mut(&mut self) -> &mut ConfigSpaceType1Emulator
pub fn cfg_space_mut(&mut self) -> &mut ConfigSpaceType1Emulator
Get a mutable reference to the configuration space emulator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DownstreamSwitchPort
impl !RefUnwindSafe for DownstreamSwitchPort
impl Send for DownstreamSwitchPort
impl !Sync for DownstreamSwitchPort
impl Unpin for DownstreamSwitchPort
impl !UnwindSafe for DownstreamSwitchPort
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