pub struct AnimatedProgress { /* private fields */ }Expand description
Animated progress bar with shimmer effect
Implementations§
Source§impl AnimatedProgress
impl AnimatedProgress
Sourcepub fn new_with_color(color: Color) -> Self
pub fn new_with_color(color: Color) -> Self
Create a new animated progress bar with a fixed color override.
Sourcepub fn set_color_override(&mut self, color: Option<Color>)
pub fn set_color_override(&mut self, color: Option<Color>)
Set or clear the color override at runtime.
Sourcepub fn set_progress(&mut self, progress: f32)
pub fn set_progress(&mut self, progress: f32)
Update the progress value
Sourcepub fn tick(&mut self, speed_mb_s: f32)
pub fn tick(&mut self, speed_mb_s: f32)
Update animation time based on transfer speed
§Arguments
speed_mb_s- Current transfer speed in MB/s to scale animation speed
Sourcepub fn color_override(&self) -> Option<Color>
pub fn color_override(&self) -> Option<Color>
Return a clone of this bar’s color override (if any).
Trait Implementations§
Source§impl Debug for AnimatedProgress
impl Debug for AnimatedProgress
Source§impl Default for AnimatedProgress
impl Default for AnimatedProgress
Source§impl<Message> Program<Message> for AnimatedProgress
impl<Message> Program<Message> for AnimatedProgress
Source§fn draw(
&self,
_state: &Self::State,
renderer: &Renderer,
_theme: &Theme,
bounds: Rectangle,
_cursor: Cursor,
) -> Vec<Geometry<Renderer>> ⓘ
fn draw( &self, _state: &Self::State, renderer: &Renderer, _theme: &Theme, bounds: Rectangle, _cursor: Cursor, ) -> Vec<Geometry<Renderer>> ⓘ
Source§fn update(
&self,
_state: &mut Self::State,
_event: &Event,
_bounds: Rectangle,
_cursor: Cursor,
) -> Option<Action<Message>>
fn update( &self, _state: &mut Self::State, _event: &Event, _bounds: Rectangle, _cursor: Cursor, ) -> Option<Action<Message>>
Source§fn mouse_interaction(
&self,
_state: &Self::State,
_bounds: Rectangle,
_cursor: Cursor,
) -> Interaction
fn mouse_interaction( &self, _state: &Self::State, _bounds: Rectangle, _cursor: Cursor, ) -> Interaction
Auto Trait Implementations§
impl !Freeze for AnimatedProgress
impl !RefUnwindSafe for AnimatedProgress
impl !Sync for AnimatedProgress
impl Send for AnimatedProgress
impl Unpin for AnimatedProgress
impl UnsafeUnpin for AnimatedProgress
impl UnwindSafe for AnimatedProgress
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.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