pub struct Environment {
pub theme: Theme,
pub layout_direction: LayoutDirection,
pub scale_factor: f32,
pub prefers_high_contrast: bool,
pub prefers_reduced_motion: bool,
pub prefers_large_text: bool,
}Expand description
Environment data that flows down the widget tree. Subtrees can override parts of the environment.
Fields§
§theme: Theme§layout_direction: LayoutDirection§scale_factor: f32§prefers_high_contrast: bool§prefers_reduced_motion: bool§prefers_large_text: boolImplementations§
Source§impl Environment
impl Environment
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
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 Environment
impl Debug for Environment
Auto Trait Implementations§
impl !RefUnwindSafe for Environment
impl !Send for Environment
impl !Sync for Environment
impl !UnwindSafe for Environment
impl Freeze for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
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