pub struct Device<Ctx: DeviceContext = Normal>(/* private fields */);
Expand description
The PCI device representation.
This structure represents the Rust abstraction for a C struct pci_dev
. The implementation
abstracts the usage of an already existing C struct pci_dev
within Rust code that we get
passed from the C side.
§Invariants
A Device
instance represents a valid struct device
created by the C portion of the kernel.
Implementations§
Source§impl Device<Bound>
impl Device<Bound>
Source§impl Device<Core>
impl Device<Core>
Sourcepub fn enable_device_mem(&self) -> Result
pub fn enable_device_mem(&self) -> Result
Enable memory resources for this device.
Sourcepub fn set_master(&self)
pub fn set_master(&self)
Enable bus-mastering for this device.
Trait Implementations§
Source§impl AlwaysRefCounted for Device
impl AlwaysRefCounted for Device
impl Send for Device
impl Sync for Device
Auto Trait Implementations§
impl<Ctx = Normal> !Freeze for Device<Ctx>
impl<Ctx = Normal> !RefUnwindSafe for Device<Ctx>
impl<Ctx = Normal> !Send for Device<Ctx>
impl<Ctx = Normal> !Sync for Device<Ctx>
impl<Ctx = Normal> !Unpin for Device<Ctx>
impl<Ctx> UnwindSafe for Device<Ctx>where
Ctx: UnwindSafe,
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