pub struct Registration(/* private fields */);Expand description
The registration of an i2c client device.
This type represents the registration of a [struct i2c_client]. When an instance of this
type is dropped, its respective i2c client device will be unregistered from the system.
§Invariants
self.0 always holds a valid pointer to an initialized and registered
[struct i2c_client].
Implementations§
Source§impl Registration
impl Registration
Sourcepub fn new<'a>(
i2c_adapter: &I2cAdapter,
i2c_board_info: &I2cBoardInfo,
parent_dev: &'a Device<Bound>,
) -> impl PinInit<Devres<Self>, Error> + 'a
pub fn new<'a>( i2c_adapter: &I2cAdapter, i2c_board_info: &I2cBoardInfo, parent_dev: &'a Device<Bound>, ) -> impl PinInit<Devres<Self>, Error> + 'a
The C i2c_new_client_device function wrapper for manual I2C client creation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registration
impl RefUnwindSafe for Registration
impl Unpin for Registration
impl UnwindSafe for Registration
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
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read more