pub struct AccessibilityPreferences {
pub text_scaling_factor: f32,
pub reduce_motion: bool,
pub high_contrast: bool,
pub reduce_transparency: bool,
}Expand description
OS-detected accessibility preferences.
A single copy lives on SystemTheme, shared across light and dark
variants. These are runtime values detected from the OS – not stored
in TOML presets.
Fields§
§text_scaling_factor: f32Text scaling factor (1.0 = no scaling). Multiply font sizes by this factor when honoring the user’s preference for larger text.
reduce_motion: boolWhether the user has requested reduced motion.
high_contrast: boolWhether a high-contrast mode is active.
reduce_transparency: boolWhether the user has requested reduced transparency.
Trait Implementations§
Source§impl Clone for AccessibilityPreferences
impl Clone for AccessibilityPreferences
Source§fn clone(&self) -> AccessibilityPreferences
fn clone(&self) -> AccessibilityPreferences
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccessibilityPreferences
impl Debug for AccessibilityPreferences
Source§impl Default for AccessibilityPreferences
impl Default for AccessibilityPreferences
Source§impl PartialEq for AccessibilityPreferences
impl PartialEq for AccessibilityPreferences
Source§fn eq(&self, other: &AccessibilityPreferences) -> bool
fn eq(&self, other: &AccessibilityPreferences) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AccessibilityPreferences
Auto Trait Implementations§
impl Freeze for AccessibilityPreferences
impl RefUnwindSafe for AccessibilityPreferences
impl Send for AccessibilityPreferences
impl Sync for AccessibilityPreferences
impl Unpin for AccessibilityPreferences
impl UnsafeUnpin for AccessibilityPreferences
impl UnwindSafe for AccessibilityPreferences
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