tm1637_embedded_hal::options

Struct ScrollDisplayOptions

Source
pub struct ScrollDisplayOptions<'d, const N: usize, T, CLK, DIO, DELAY, I, D> { /* private fields */ }
Expand description

High-level API for scroll animations.

Implementations§

Source§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, M> ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, M>

Source

pub fn new( options: DisplayOptions<'d, N, T, CLK, DIO, DELAY, I, M>, delay_ms: u32, direction: ScrollDirection, style: ScrollStyle, ) -> Self

Create a new ScrollDisplayOptions instance.

Source

pub fn new_with_defaults( options: DisplayOptions<'d, N, T, CLK, DIO, DELAY, I, M>, ) -> Self

Create a new ScrollDisplayOptions instance with default settings.

Source

pub const fn delay_ms(self, delay_ms: u32) -> Self

Set the delay in milliseconds between each animation step.

Source

pub const fn direction(self, direction: ScrollDirection) -> Self

Set the animation direction.

Source

pub const fn left(self) -> Self

Set the animation direction to ScrollDirection::LeftToRight.

Source

pub const fn right(self) -> Self

Set the animation direction to ScrollDirection::RightToLeft.

Source

pub const fn style(self, style: ScrollStyle) -> Self

Set the animation style.

Source

pub fn finish( self, ) -> Scroller<'d, N, T, CLK, DIO, DELAY, impl Iterator<Item = impl DoubleEndedIterator<Item = u8> + ExactSizeIterator>, M>

Finish setting the scroll animation.

Trait Implementations§

Source§

impl<'d, const N: usize, T: Debug, CLK: Debug, DIO: Debug, DELAY: Debug, I: Debug, D: Debug> Debug for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> Format for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>
where DisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>: Format, ScrollDirection: Format, ScrollStyle: Format,

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.

Auto Trait Implementations§

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> Freeze for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>
where I: Freeze, D: Freeze,

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> RefUnwindSafe for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> Send for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>
where I: Send, D: Send, CLK: Send, DIO: Send, DELAY: Send, T: Send,

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> Sync for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>
where I: Sync, D: Sync, CLK: Sync, DIO: Sync, DELAY: Sync, T: Sync,

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> Unpin for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>
where I: Unpin, D: Unpin,

§

impl<'d, const N: usize, T, CLK, DIO, DELAY, I, D> !UnwindSafe for ScrollDisplayOptions<'d, N, T, CLK, DIO, DELAY, I, D>

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.