pub struct RotatingCircleOptions<'d, const N: usize, T, CLK, DIO, DELAY, M> { /* private fields */ }
Expand description
Default rotating circle options.
The animation consists of a single circle that rotates clockwise or counter-clockwise on a given position.
Implementations§
Source§impl<'d, const N: usize, T, CLK, DIO, DELAY, M> RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>
Sourcepub fn new(
device: &'d mut TM1637<N, T, CLK, DIO, DELAY>,
position: usize,
delay_ms: u32,
direction: RotatingDirection,
flip: M,
) -> Self
pub fn new( device: &'d mut TM1637<N, T, CLK, DIO, DELAY>, position: usize, delay_ms: u32, direction: RotatingDirection, flip: M, ) -> Self
Create a new RotatingCircleOptions
instance.
Sourcepub fn new_with_defaults(
device: &'d mut TM1637<N, T, CLK, DIO, DELAY>,
flip: M,
) -> Self
pub fn new_with_defaults( device: &'d mut TM1637<N, T, CLK, DIO, DELAY>, flip: M, ) -> Self
Create a new RotatingCircleOptions
instance with default settings.
Sourcepub const fn position(self, position: usize) -> Self
pub const fn position(self, position: usize) -> Self
Set the starting position of the rotating circle.
Sourcepub const fn delay_ms(self, delay_ms: u32) -> Self
pub const fn delay_ms(self, delay_ms: u32) -> Self
Set the delay in milliseconds between each animation step.
Sourcepub const fn direction(self, direction: RotatingDirection) -> Self
pub const fn direction(self, direction: RotatingDirection) -> Self
Set the rotating direction.
Sourcepub fn flip(
self,
) -> RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, impl MaybeFlipped<N>>where
M: MaybeFlipped<N>,
pub fn flip(
self,
) -> RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, impl MaybeFlipped<N>>where
M: MaybeFlipped<N>,
Flip the display.
Sourcepub fn finish(
self,
) -> Scroller<'d, N, T, CLK, DIO, DELAY, impl Iterator<Item = impl DoubleEndedIterator<Item = u8> + ExactSizeIterator>, M>
pub fn finish( self, ) -> Scroller<'d, N, T, CLK, DIO, DELAY, impl Iterator<Item = impl DoubleEndedIterator<Item = u8> + ExactSizeIterator>, M>
Finish setting the rotating circle animation.
Trait Implementations§
Auto Trait Implementations§
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> Freeze for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>where
M: Freeze,
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> RefUnwindSafe for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>where
M: RefUnwindSafe,
CLK: RefUnwindSafe,
DIO: RefUnwindSafe,
DELAY: RefUnwindSafe,
T: RefUnwindSafe,
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> Send for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> Sync for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> Unpin for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>where
M: Unpin,
impl<'d, const N: usize, T, CLK, DIO, DELAY, M> !UnwindSafe for RotatingCircleOptions<'d, N, T, CLK, DIO, DELAY, M>
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