Struct omnisensor::i2c::I2CDevice
source · [−]pub struct I2CDevice {
pub params: I2CDeviceParams,
}Expand description
An instantiated I2C device.
Doesn’t do much aside from acting as a token that keeps the device instantiated as
long as it exists (its drop impl deletes the device).
Fields
params: I2CDeviceParamsThe parameters of the device we’ve instantiated.
Implementations
sourceimpl I2CDevice
impl I2CDevice
sourcepub fn new(params: I2CDeviceParams) -> Result<Self, Box<dyn Error>>
pub fn new(params: I2CDeviceParams) -> Result<Self, Box<dyn Error>>
Instantiate an I2CDevice from an I2CDeviceParams.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for I2CDevice
impl Send for I2CDevice
impl Sync for I2CDevice
impl Unpin for I2CDevice
impl UnwindSafe for I2CDevice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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