Struct shared_bus::I2cProxy
source · [−]pub struct I2cProxy<'a, M> { /* private fields */ }
Expand description
Proxy type for I2C bus sharing.
The I2cProxy
implements all (blocking) I2C traits so it can be passed to drivers instead of
the bus instance. Internally, it holds reference to the bus via a mutex, ensuring that all
accesses are strictly synchronized.
An I2cProxy
is created by calling BusManager::acquire_i2c()
.
Trait Implementations
Auto Trait Implementations
impl<'a, M> RefUnwindSafe for I2cProxy<'a, M> where
M: RefUnwindSafe,
impl<'a, M> Send for I2cProxy<'a, M> where
M: Sync,
impl<'a, M> Sync for I2cProxy<'a, M> where
M: Sync,
impl<'a, M> Unpin for I2cProxy<'a, M>
impl<'a, M> UnwindSafe for I2cProxy<'a, M> where
M: RefUnwindSafe,
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more