pub struct Env {
pub theme: Theme,
pub system_theme_mode: DesignMode,
pub i18n: I18nRegistry,
pub locale: Locale,
pub window: WindowEnv,
pub current_route: RouteLocation,
pub window_insets: WindowInsets,
pub viewport_size: LayoutSize,
pub measurer: Option<Arc<dyn TextMeasurer>>,
}Fields§
§theme: Theme§system_theme_mode: DesignModeCurrent light/dark appearance reported by the host platform.
Applications that offer a “System” preference can select their generated design-system theme from this value during environment synchronization.
i18n: I18nRegistry§locale: Locale§window: WindowEnv§current_route: RouteLocation§window_insets: WindowInsets§viewport_size: LayoutSize§measurer: Option<Arc<dyn TextMeasurer>>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Env
impl !UnwindSafe for Env
impl Freeze for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnsafeUnpin for Env
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.