pub struct ButtonProgressPlayback { /* private fields */ }Expand description
Persistent progress/loading presentation for one logical button.
Keep this handle across virtual unmounts. Forward actual progress, loading,
and disabled changes with Self::sync while unmounted; do not report a
virtual unmount as hiding progress. Clones share playback, not interaction
state. A fresh handle starts a new lifecycle.
Implementations§
Source§impl ButtonProgressPlayback
impl ButtonProgressPlayback
Sourcepub fn sync(&self, progress: bool, loading: bool, disabled: bool, cx: &App)
pub fn sync(&self, progress: bool, loading: bool, disabled: bool, cx: &App)
Record real input changes at their event time without requesting frames.
disabled is the caller’s independent flag; loading also disables.
First showing progress starts its circular clock. Hiding preserves that
clock, but the next show adopts the new opacity rather than resuming an
old hidden transition, matching the ordinary button API.
Sourcepub fn observe_reduced_motion(&self, cx: &App)
pub fn observe_reduced_motion(&self, cx: &App)
Forward a preference change after updating the app, including offscreen. This does not start unused progress or restart a previously stopped loop. Opacity retains its existing reduced-motion Continue policy.
Trait Implementations§
Source§impl Clone for ButtonProgressPlayback
impl Clone for ButtonProgressPlayback
Source§fn clone(&self) -> ButtonProgressPlayback
fn clone(&self) -> ButtonProgressPlayback
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ButtonProgressPlayback
impl Default for ButtonProgressPlayback
Source§fn default() -> ButtonProgressPlayback
fn default() -> ButtonProgressPlayback
Auto Trait Implementations§
impl !RefUnwindSafe for ButtonProgressPlayback
impl !Send for ButtonProgressPlayback
impl !Sync for ButtonProgressPlayback
impl !UnwindSafe for ButtonProgressPlayback
impl Freeze for ButtonProgressPlayback
impl Unpin for ButtonProgressPlayback
impl UnsafeUnpin for ButtonProgressPlayback
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().