pub struct ComponentsOverlay {
pub title: String,
pub components: Vec<ComponentSnapshot>,
pub selected: usize,
pub expanded: HashSet<usize>,
}Expand description
Overlay for displaying mounted components
Fields§
§title: StringTitle for the overlay
components: Vec<ComponentSnapshot>Snapshots of all mounted components
selected: usizeCurrently selected component index
expanded: HashSet<usize>Set of expanded component indices (show debug entries)
Implementations§
Source§impl ComponentsOverlay
impl ComponentsOverlay
Sourcepub fn new(
title: impl Into<String>,
components: Vec<ComponentSnapshot>,
) -> ComponentsOverlay
pub fn new( title: impl Into<String>, components: Vec<ComponentSnapshot>, ) -> ComponentsOverlay
Create from a vec of snapshots.
Sourcepub fn scroll_down(&mut self)
pub fn scroll_down(&mut self)
Scroll down (select next component)
Sourcepub fn scroll_to_top(&mut self)
pub fn scroll_to_top(&mut self)
Jump to the top
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Jump to the bottom
Sourcepub fn toggle_expanded(&mut self)
pub fn toggle_expanded(&mut self)
Toggle expansion of the currently selected component.
Sourcepub fn is_expanded(&self, index: usize) -> bool
pub fn is_expanded(&self, index: usize) -> bool
Whether the given index is expanded.
Trait Implementations§
Source§impl Clone for ComponentsOverlay
impl Clone for ComponentsOverlay
Source§fn clone(&self) -> ComponentsOverlay
fn clone(&self) -> ComponentsOverlay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ComponentsOverlay
impl RefUnwindSafe for ComponentsOverlay
impl Send for ComponentsOverlay
impl Sync for ComponentsOverlay
impl Unpin for ComponentsOverlay
impl UnsafeUnpin for ComponentsOverlay
impl UnwindSafe for ComponentsOverlay
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more