Struct sx1509::Owned
[−]
[src]
pub struct Owned<I2C> where
I2C: WriteRead + Write, { /* fields omitted */ }
The Owned
struct encapsulates the device and owns the bus.
You need to borrow
to issue IO, or release
to release
ownership of the bus.
Methods
impl<I2C> Owned<I2C> where
I2C: WriteRead + Write,
[src]
I2C: WriteRead + Write,
pub fn release(self) -> (Sx1509<I2C>, I2C)
[src]
Release ownership of the bus and decompose the Owned
instance back
into its constituent Sx1509
and I2C
components.
pub fn borrow<'a>(&'a mut self) -> Borrowed<'a, I2C>
[src]
Create a Borrowed
instance from this Owned
instance so that you
can perform IO on it.
Ideally we'd impl Deref
and DerefMut
instead of doing this, but
it seems impossible to do this and preserve appropriate lifetimes.