Ws2812

Struct Ws2812 

Source
pub struct Ws2812<UART, DEV = Ws2812> { /* private fields */ }

Implementations§

Source§

impl<UART, DEV> Ws2812<UART, DEV>

Source

pub fn new(uart: UART) -> Self

Construct smart LED output from an UART instance.

Trait Implementations§

Source§

impl<UART, DEV> SmartLedsWrite for Ws2812<UART, DEV>
where UART: BlockingWrite, DEV: Ws2812Like,

Source§

type Error = <UART as ErrorType>::Error

Source§

type Color = <DEV as Ws2812Like>::Color

Source§

fn write<T, I>(&mut self, iterator: T) -> Result<(), Self::Error>
where T: IntoIterator<Item = I>, I: Into<Self::Color>,

Source§

impl<UART, DEV> SmartLedsWriteAsync for Ws2812<UART, DEV>
where UART: AsyncWrite, DEV: Ws2812Like,

Source§

type Error = <UART as ErrorType>::Error

Source§

type Color = <DEV as Ws2812Like>::Color

Source§

async fn write<T, I>(&mut self, iterator: T) -> Result<(), Self::Error>
where T: IntoIterator<Item = I>, I: Into<Self::Color>,

Auto Trait Implementations§

§

impl<UART, DEV> Freeze for Ws2812<UART, DEV>
where UART: Freeze,

§

impl<UART, DEV> RefUnwindSafe for Ws2812<UART, DEV>
where UART: RefUnwindSafe, DEV: RefUnwindSafe,

§

impl<UART, DEV> Send for Ws2812<UART, DEV>
where UART: Send, DEV: Send,

§

impl<UART, DEV> Sync for Ws2812<UART, DEV>
where UART: Sync, DEV: Sync,

§

impl<UART, DEV> Unpin for Ws2812<UART, DEV>
where UART: Unpin, DEV: Unpin,

§

impl<UART, DEV> UnwindSafe for Ws2812<UART, DEV>
where UART: UnwindSafe, DEV: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.