pub enum DebugLayer {
All,
TopMost,
BaseOnly,
}Expand description
Which layers the F12 debug overlay should outline (issue #201).
All (the default) outlines both the base layer and any active
overlays/modals — matching the user’s expectation for “show everything
the renderer is producing this frame.” TopMost only outlines the
topmost overlay (or the base if no overlay is active), and BaseOnly
keeps the legacy pre-fix behavior of skipping overlays entirely.
At runtime, Shift+F12 cycles All → TopMost → BaseOnly → All so a
developer debugging a stacked modal can shrink the visible outlines to
just the layer they care about without leaving the keyboard. Plain
F12 independently toggles the overlay on/off.
§Example
use slt::{Context, DebugLayer};
slt::run(|ui: &mut Context| {
// Match on the current layer to drive bespoke debug UI.
let label = match ui.debug_layer() {
DebugLayer::All => "showing base + overlays",
DebugLayer::TopMost => "showing topmost overlay only",
DebugLayer::BaseOnly => "showing base layer only",
};
ui.text(label);
})
.unwrap();Variants§
All
Outline both the base tree and every active overlay/modal.
Default. Matches the reporter expectation that F12 reflects everything the renderer is producing this frame. Each layer family gets its own hue so a glance distinguishes base, overlay, and modal containers.
TopMost
Outline only the topmost overlay (or the base if no overlay is active).
Useful when modals or popovers stack and you only care about the active dialog — base-tree outlines become noise underneath an open modal.
BaseOnly
Outline only the base layer (legacy v0.19.x behavior).
Skips overlays and modals entirely. Use when an overlay is confirmed correct and you want to inspect the base layout underneath it.
Trait Implementations§
Source§impl Clone for DebugLayer
impl Clone for DebugLayer
Source§fn clone(&self) -> DebugLayer
fn clone(&self) -> DebugLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DebugLayer
Source§impl Debug for DebugLayer
impl Debug for DebugLayer
Source§impl Default for DebugLayer
impl Default for DebugLayer
Source§fn default() -> DebugLayer
fn default() -> DebugLayer
impl Eq for DebugLayer
Source§impl PartialEq for DebugLayer
impl PartialEq for DebugLayer
Source§fn eq(&self, other: &DebugLayer) -> bool
fn eq(&self, other: &DebugLayer) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DebugLayer
Auto Trait Implementations§
impl Freeze for DebugLayer
impl RefUnwindSafe for DebugLayer
impl Send for DebugLayer
impl Sync for DebugLayer
impl Unpin for DebugLayer
impl UnsafeUnpin for DebugLayer
impl UnwindSafe for DebugLayer
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.