pub struct PulsingIndicator {
pub start_time: Instant,
pub cycle_duration: Duration,
pub min_opacity: f64,
pub max_opacity: f64,
}Expand description
Manages a pulsing indicator (like a thinking/loading state)
Fields§
§start_time: Instant§cycle_duration: Duration§min_opacity: f64§max_opacity: f64Implementations§
Source§impl PulsingIndicator
impl PulsingIndicator
pub fn new() -> Self
pub fn with_speed(self, cycle_duration: Duration) -> Self
pub fn current_opacity(&self) -> f64
pub fn reset(&mut self)
Auto Trait Implementations§
impl Freeze for PulsingIndicator
impl RefUnwindSafe for PulsingIndicator
impl Send for PulsingIndicator
impl Sync for PulsingIndicator
impl Unpin for PulsingIndicator
impl UnwindSafe for PulsingIndicator
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> 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<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