pub struct HostEnvironment {
pub locale: Option<Locale>,
pub font_scale: Option<f32>,
}Expand description
The settings an embedding app gives its surfaces in place of the
system’s (None: the system’s): its own language and text size, for an
app inside a native app that lets its users switch them. The platforms
write them over what they read from the system (Self::apply), so the
app’s Intl, locale(), fontScale() and text follow them like a system
change.
Fields§
§locale: Option<Locale>The locale in place of the user’s (Environment::locale).
font_scale: Option<f32>The text size in place of the user’s (Environment::font_scale);
values that are not finite and positive count as None.
Implementations§
Source§impl HostEnvironment
impl HostEnvironment
Sourcepub fn apply(&self, env: &mut Environment)
pub fn apply(&self, env: &mut Environment)
Writes the settings self has over env’s.
Trait Implementations§
Source§impl Clone for HostEnvironment
impl Clone for HostEnvironment
Source§fn clone(&self) -> HostEnvironment
fn clone(&self) -> HostEnvironment
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 moreimpl Copy for HostEnvironment
Source§impl Debug for HostEnvironment
impl Debug for HostEnvironment
Source§impl Default for HostEnvironment
impl Default for HostEnvironment
Source§fn default() -> HostEnvironment
fn default() -> HostEnvironment
Returns the “default value” for a type. Read more
Source§impl PartialEq for HostEnvironment
impl PartialEq for HostEnvironment
impl StructuralPartialEq for HostEnvironment
Auto Trait Implementations§
impl Freeze for HostEnvironment
impl RefUnwindSafe for HostEnvironment
impl Send for HostEnvironment
impl Sync for HostEnvironment
impl Unpin for HostEnvironment
impl UnsafeUnpin for HostEnvironment
impl UnwindSafe for HostEnvironment
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