pub struct Adapter<T: Driver>(_);
Expand description
An adapter for the registration of platform drivers.
Trait Implementations
sourceimpl<T: Driver> DriverOps for Adapter<T>
impl<T: Driver> DriverOps for Adapter<T>
type RegType = platform_driver
type RegType = platform_driver
The type that holds information about the registration. This is typically a struct defined by the C portion of the kernel. Read more
sourceunsafe fn register(
reg: *mut platform_driver,
name: &'static CStr,
module: &'static ThisModule
) -> Result
unsafe fn register(
reg: *mut platform_driver,
name: &'static CStr,
module: &'static ThisModule
) -> Result
Registers a driver. Read more
sourceunsafe fn unregister(reg: *mut platform_driver)
unsafe fn unregister(reg: *mut platform_driver)
Unregisters a driver previously registered with DriverOps::register
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Adapter<T> where
T: RefUnwindSafe,
impl<T> Send for Adapter<T> where
T: Send,
impl<T> Sync for Adapter<T> where
T: Sync,
impl<T> Unpin for Adapter<T> where
T: Unpin,
impl<T> UnwindSafe for Adapter<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more