pub struct FlapBoardState { /* private fields */ }Expand description
Owns all per-cell animation state for a split-flap board.
Driven externally via tick() and set_message().
Implementations§
Source§impl FlapBoardState
impl FlapBoardState
pub fn new(rows: usize, cols: usize) -> Self
pub fn with_charset(self, charset: CharSet) -> Self
pub fn with_flip_style(self, style: FlipStyle) -> Self
pub fn with_flip_speed_ms(self, ms: u64) -> Self
pub fn with_stagger_ms(self, ms: u64) -> Self
Sourcepub fn tick(&mut self, delta_ms: u64) -> bool
pub fn tick(&mut self, delta_ms: u64) -> bool
Stagger is column-only: each column’s pending delay is col_idx * stagger_ms.
In multi-row boards, all rows begin simultaneously.
pub fn set_message(&mut self, msg: &FlapMessage)
pub fn reset(&mut self)
pub fn cell(&self, row: usize, col: usize) -> Option<&FlapCell>
pub fn rows(&self) -> usize
pub fn cols(&self) -> usize
pub fn charset(&self) -> &CharSet
pub fn flip_style(&self) -> FlipStyle
Trait Implementations§
Source§impl Clone for FlapBoardState
impl Clone for FlapBoardState
Source§fn clone(&self) -> FlapBoardState
fn clone(&self) -> FlapBoardState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FlapBoardState
impl RefUnwindSafe for FlapBoardState
impl Send for FlapBoardState
impl Sync for FlapBoardState
impl Unpin for FlapBoardState
impl UnsafeUnpin for FlapBoardState
impl UnwindSafe for FlapBoardState
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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