pub struct LayoutKnobs {
pub skip: bool,
pub audit: bool,
pub retained: bool,
}Expand description
The layout-skip and retained-layer knobs a shell resolves once at startup and applies to
its RenderRoot (directly, or through crate::AppTree).
Fields§
§skip: boolValue for RenderRoot::set_layout_skip (false when
NO_LAYOUT_SKIP_VAR is set).
audit: boolValue for RenderRoot::set_layout_audit (true when
LAYOUT_AUDIT_VAR is set non-"0").
retained: boolValue for RenderRoot::set_retained_layers (false when
NO_RETAINED_LAYERS_VAR is set).
Implementations§
Source§impl LayoutKnobs
impl LayoutKnobs
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Resolve the knobs from the compile-time defines and the process
environment (the same option_env! + runtime-env shape as the other
FRUST_* switches; Android/iOS have no useful runtime env, so the
compile-time define is their route).
Sourcepub fn resolve(
no_skip: KnobSource<'_>,
audit: KnobSource<'_>,
no_retained: KnobSource<'_>,
) -> Self
pub fn resolve( no_skip: KnobSource<'_>, audit: KnobSource<'_>, no_retained: KnobSource<'_>, ) -> Self
The pure resolution Self::from_env wraps, unit-testable without
touching the process environment. Each argument names where one knob’s
switch variable was found: no_skip (NO_LAYOUT_SKIP_VAR), audit
(LAYOUT_AUDIT_VAR) and no_retained (NO_RETAINED_LAYERS_VAR).
Sourcepub fn apply_to_app(self, app: &mut dyn AppTree)
pub fn apply_to_app(self, app: &mut dyn AppTree)
Apply to a type-erased app and log one info line.
Trait Implementations§
Source§impl Clone for LayoutKnobs
impl Clone for LayoutKnobs
impl Copy for LayoutKnobs
Source§impl Debug for LayoutKnobs
impl Debug for LayoutKnobs
impl Eq for LayoutKnobs
Source§impl PartialEq for LayoutKnobs
impl PartialEq for LayoutKnobs
impl StructuralPartialEq for LayoutKnobs
Auto Trait Implementations§
impl Freeze for LayoutKnobs
impl RefUnwindSafe for LayoutKnobs
impl Send for LayoutKnobs
impl Sync for LayoutKnobs
impl Unpin for LayoutKnobs
impl UnsafeUnpin for LayoutKnobs
impl UnwindSafe for LayoutKnobs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.