pub struct BaseCap<'a> { /* private fields */ }
Expand description
A single capability within a specific device’s configuration space.
This is a generic representation of a capability. It provides only low-level methods for reading and writing the capability fields. Other structs in this module will wrap this struct and provide higher level methods for accessing specific fields.
The 'a
lifetime references the Device
this capability belongs to.
Implementations§
Source§impl BaseCap<'_>
impl BaseCap<'_>
Sourcepub fn read8(&self, offset: u16) -> u8
pub fn read8(&self, offset: u16) -> u8
Reads an 8-bit value relative to the base of this capability.
Sourcepub fn write8(&self, offset: u16, val: u8)
pub fn write8(&self, offset: u16, val: u8)
Writes an 8-bit value relative to the base of this capability.
Sourcepub fn read16(&self, offset: u16) -> u16
pub fn read16(&self, offset: u16) -> u16
Reads a 16-bit value relative to the base of this capability.
Sourcepub fn write16(&self, offset: u16, val: u16)
pub fn write16(&self, offset: u16, val: u16)
Writes a 16-bit value relative to the base of this capability.
Trait Implementations§
impl<'a> Copy for BaseCap<'a>
Auto Trait Implementations§
impl<'a> Freeze for BaseCap<'a>
impl<'a> RefUnwindSafe for BaseCap<'a>
impl<'a> Send for BaseCap<'a>
impl<'a> Sync for BaseCap<'a>
impl<'a> Unpin for BaseCap<'a>
impl<'a> UnwindSafe for BaseCap<'a>
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