pub struct PciBus {
bus_num: u8,
parent_bus_num: u8,
child_devices: HashSet<PciAddress>,
child_buses: HashMap<u8, Arc<Mutex<PciBus>>>,
hotplug_bus: bool,
}
Expand description
Pci Bus information
Fields§
§bus_num: u8
§parent_bus_num: u8
§child_devices: HashSet<PciAddress>
§child_buses: HashMap<u8, Arc<Mutex<PciBus>>>
§hotplug_bus: bool
Implementations§
source§impl PciBus
impl PciBus
pub fn new(bus_num: u8, parent_bus_num: u8, hotplug_bus: bool) -> Self
pub fn get_bus_num(&self) -> u8
pub fn path_to(&self, bus_num: u8) -> Vec<u8> ⓘ
pub fn add_child_device(&mut self, add_device: PciAddress) -> Result<(), Error>
pub fn remove_child_device(&mut self, device: PciAddress) -> Result<(), Error>
pub fn add_child_bus( &mut self, add_bus: Arc<Mutex<PciBus>> ) -> Result<(), Error>
pub fn remove_child_bus(&mut self, bus_no: u8) -> Result<(), Error>
pub fn find_downstream_devices(&self, bus_no: u8) -> Vec<PciAddress>
pub fn get_downstream_devices(&self) -> Vec<PciAddress>
pub fn contains(&self, device: PciAddress) -> bool
pub fn get_hotplug_bus(&self, device: PciAddress) -> Option<u8>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PciBus
impl Send for PciBus
impl Sync for PciBus
impl Unpin for PciBus
impl UnwindSafe for PciBus
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.