pub struct BackgroundState {
pub style: BackgroundStyle,
/* private fields */
}Fields§
§style: BackgroundStyleImplementations§
Source§impl BackgroundState
impl BackgroundState
pub fn new(style: BackgroundStyle) -> Self
Sourcepub fn tick(&mut self, w: u16, h: u16)
pub fn tick(&mut self, w: u16, h: u16)
Advance the animation by one step. Call before each render frame.
Sourcepub fn render(&self, frame: &mut Frame<'_>, area: Rect)
pub fn render(&self, frame: &mut Frame<'_>, area: Rect)
Render the current animation frame into area.
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
True when the background is animated (needs periodic redraws).
Auto Trait Implementations§
impl Freeze for BackgroundState
impl RefUnwindSafe for BackgroundState
impl Send for BackgroundState
impl Sync for BackgroundState
impl Unpin for BackgroundState
impl UnsafeUnpin for BackgroundState
impl UnwindSafe for BackgroundState
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> 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