pub struct Indicator { /* private fields */ }Expand description
A running indicator.
Implementations§
Source§impl Indicator
impl Indicator
Sourcepub fn begin(&mut self, tick: u32)
pub fn begin(&mut self, tick: u32)
Restart the animation at tick and forget what is on screen, so the
next poll draws.
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Forget what is on screen (the picture was cleared or replaced), so the
next poll draws again at once.
Sourcepub fn poll(&mut self, sink: &mut dyn Sink, tick: u32) -> bool
pub fn poll(&mut self, sink: &mut dyn Sink, tick: u32) -> bool
Draw if the picture at tick differs from what is on screen. Returns
whether it drew.
The first poll after new, begin or
invalidate always draws. After that a poll draws
only when the tail stepped or the ink moved a level, and a poll at the
tick already shown does nothing. It never waits for a VBlank. Call it as
often as is convenient between steps of a blocking load, with a tick
that advances once per VBlank.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indicator
impl RefUnwindSafe for Indicator
impl Send for Indicator
impl Sync for Indicator
impl Unpin for Indicator
impl UnsafeUnpin for Indicator
impl UnwindSafe for Indicator
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)