pub enum BarInfo {
Memory {
address_type: MemoryBarType,
prefetchable: bool,
address: u64,
size: u64,
},
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: MemoryBarTypeThe size of the BAR address and where it can be located.
§
prefetchable: boolIf true, then reading from the region doesn’t have side effects. The CPU may cache reads and merge repeated stores.
§
address: u64The memory address, always 16-byte aligned.
§
size: u64The 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, u64)>
pub fn memory_address_size(&self) -> Option<(u64, u64)>
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, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)