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