Enum driver_pci::BarInfo
pub enum BarInfo {
Memory {
address_type: MemoryBarType,
prefetchable: bool,
address: u64,
size: u32,
},
IO {
address: u32,
size: u32,
},
}
Expand description
Information about a PCI Base Address Register.
Variants§
Memory
Fields
§
address_type: MemoryBarType
The size of the BAR address and where it can be located.
The BAR is for a memory region.
IO
The BAR is for an I/O region.
Implementations§
§impl BarInfo
impl BarInfo
pub fn takes_two_entries(&self) -> bool
pub fn takes_two_entries(&self) -> bool
Returns whether this BAR is a 64-bit memory region, and so takes two entries in the table in configuration space.
pub fn memory_address_size(&self) -> Option<(u64, u32)>
pub fn memory_address_size(&self) -> Option<(u64, u32)>
Returns the address and size of this BAR if it is a memory bar, or None
if it is an IO
BAR.
Trait Implementations§
impl Eq for BarInfo
impl StructuralEq for BarInfo
impl StructuralPartialEq for BarInfo
Auto Trait Implementations§
impl RefUnwindSafe for BarInfo
impl Send for BarInfo
impl Sync for BarInfo
impl Unpin for BarInfo
impl UnwindSafe for BarInfo
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