pub struct ValidatedPinScl<P, I2C>(/* private fields */);Expand description
A runtime validated Scl pin for I2C.
Implementations§
Source§impl<P, S> ValidatedPinScl<P, S>
impl<P, S> ValidatedPinScl<P, S>
Sourcepub fn validate(p: P, _u: &S) -> Result<ValidatedPinScl<P, S>, P>
pub fn validate(p: P, _u: &S) -> Result<ValidatedPinScl<P, S>, P>
Validate a pin’s function on a i2c peripheral.
Will err if the pin cannot be used as a Scl pin for that I2C.
Trait Implementations§
impl<P, I2C> ValidPinScl<I2C> for ValidatedPinScl<P, I2C>where
I2C: I2cDevice,
Auto Trait Implementations§
impl<P, I2C> Freeze for ValidatedPinScl<P, I2C>where
P: Freeze,
impl<P, I2C> RefUnwindSafe for ValidatedPinScl<P, I2C>where
P: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<P, I2C> Send for ValidatedPinScl<P, I2C>
impl<P, I2C> Sync for ValidatedPinScl<P, I2C>
impl<P, I2C> Unpin for ValidatedPinScl<P, I2C>
impl<P, I2C> UnwindSafe for ValidatedPinScl<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