pub struct MotionPrefs {
pub reduced: bool,
pub time_scale: f32,
}Expand description
App-wide motion policy, plain data. The UI layer reads it; Animated takes it per retarget.
Fields§
§reduced: boolReduce motion (the OS accessibility setting or a user override): see Class::reduce.
time_scale: f32Clock speed for motion: 1 normal, 0 paused, 0.25 slow motion. The caller’s clock applies
it; read it through MotionPrefs::scale, which keeps it within 0..=10.
Implementations§
Source§impl MotionPrefs
impl MotionPrefs
Sourcepub const DEFAULT: MotionPrefs
pub const DEFAULT: MotionPrefs
Full motion at normal speed.
Sourcepub const REDUCED: MotionPrefs
pub const REDUCED: MotionPrefs
Reduced motion at normal speed.
Sourcepub const MAX_TIME_SCALE: f32 = 10.0
pub const MAX_TIME_SCALE: f32 = 10.0
The largest time scale.
Sourcepub const fn new(reduced: bool, time_scale: f32) -> MotionPrefs
pub const fn new(reduced: bool, time_scale: f32) -> MotionPrefs
Preferences with time_scale clamped to 0..=10 (NaN is 1).
Trait Implementations§
Source§impl Clone for MotionPrefs
impl Clone for MotionPrefs
impl Copy for MotionPrefs
Source§impl Debug for MotionPrefs
impl Debug for MotionPrefs
Source§impl Default for MotionPrefs
impl Default for MotionPrefs
Source§impl PartialEq for MotionPrefs
impl PartialEq for MotionPrefs
impl StructuralPartialEq for MotionPrefs
Auto Trait Implementations§
impl Forget for MotionPrefs
impl Freeze for MotionPrefs
impl Move for MotionPrefs
impl RefUnwindSafe for MotionPrefs
impl Send for MotionPrefs
impl Sync for MotionPrefs
impl Unpin for MotionPrefs
impl UnsafeUnpin for MotionPrefs
impl UnwindSafe for MotionPrefs
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