pub struct ValidatedPinSda<P, I2C>(/* private fields */);Expand description
A runtime validated Sda pin for I2C.
Implementations§
Source§impl<P, S> ValidatedPinSda<P, S>
impl<P, S> ValidatedPinSda<P, S>
Sourcepub fn validate(p: P, _u: &S) -> Result<ValidatedPinSda<P, S>, P>
pub fn validate(p: P, _u: &S) -> Result<ValidatedPinSda<P, S>, P>
Validate a pin’s function on a i2c peripheral.
Will err if the pin cannot be used as a Sda pin for that I2C.
Trait Implementations§
impl<P, I2C> ValidPinSda<I2C> for ValidatedPinSda<P, I2C>where
I2C: I2cDevice,
Auto Trait Implementations§
impl<P, I2C> Freeze for ValidatedPinSda<P, I2C>where
P: Freeze,
impl<P, I2C> RefUnwindSafe for ValidatedPinSda<P, I2C>where
P: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<P, I2C> Send for ValidatedPinSda<P, I2C>
impl<P, I2C> Sync for ValidatedPinSda<P, I2C>
impl<P, I2C> Unpin for ValidatedPinSda<P, I2C>
impl<P, I2C> UnwindSafe for ValidatedPinSda<P, I2C>where
P: UnwindSafe,
I2C: UnwindSafe,
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more