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
The BAR is for a memory region.
Fields
§
address_type: MemoryBarType
The size of the BAR address and where it can be located.
§
prefetchable: bool
If true, then reading from the region doesn’t have side effects. The CPU may cache reads and merge repeated stores.
§
address: u64
The memory address, always 16-byte aligned.
§
size: u32
The size of the BAR in bytes.
IO
The BAR is for an I/O region.
Implementations§
Source§impl BarInfo
impl BarInfo
Sourcepub 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.
Sourcepub 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 StructuralPartialEq for BarInfo
Auto Trait Implementations§
impl Freeze for BarInfo
impl RefUnwindSafe for BarInfo
impl Send for BarInfo
impl Sync for BarInfo
impl Unpin for BarInfo
impl UnwindSafe for BarInfo
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, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)