pub struct Panel {
pub title: String,
pub content: PanelContent,
pub width: f32,
pub height: f32,
}Expand description
A single panel in the DevTools dashboard.
Fields§
§title: StringThe display title of the panel tab.
content: PanelContentThe type of content this panel renders.
width: f32The panel width as a fraction of the dashboard (0.0–1.0).
height: f32The panel height as a fraction of the dashboard (0.0–1.0).
Implementations§
Source§impl Panel
impl Panel
Sourcepub fn new(title: &str, content: PanelContent) -> Self
pub fn new(title: &str, content: PanelContent) -> Self
Create a new Panel with the given title and content type.
§Arguments
title— The tab title displayed in the dashboard.content— ThePanelContentvariant to render.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Panel
impl RefUnwindSafe for Panel
impl Send for Panel
impl Sync for Panel
impl Unpin for Panel
impl UnsafeUnpin for Panel
impl UnwindSafe for Panel
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