#[non_exhaustive]pub struct DashboardInfo {
pub name: String,
pub caption: String,
pub navigation: Option<String>,
pub icon: Option<String>,
pub items: Vec<DashboardItem>,
pub variants: Vec<(String, String, String)>,
}Expand description
Other views together. It is bound to no records: each piece keeps its own frame.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIts name, which its view’s id starts with.
caption: StringWhat people see.
The group it goes under in the navigation.
icon: Option<String>The name of its icon.
items: Vec<DashboardItem>Its pieces, in order.
variants: Vec<(String, String, String)>Other dashboards people can change it to: an id, what they see, and the other’s name.
Implementations§
Source§impl DashboardInfo
impl DashboardInfo
Sourcepub fn new(name: impl Into<String>, caption: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, caption: impl Into<String>) -> Self
A dashboard with nothing in it yet.
The group it goes under in the navigation.
Sourcepub fn variant(
self,
id: impl Into<String>,
caption: impl Into<String>,
dashboard: impl Into<String>,
) -> Self
pub fn variant( self, id: impl Into<String>, caption: impl Into<String>, dashboard: impl Into<String>, ) -> Self
Lets people change it to another dashboard, by that one’s name. It takes two for the menu to show, so a dashboard lists itself as well.
Trait Implementations§
Source§impl Clone for DashboardInfo
impl Clone for DashboardInfo
Source§fn clone(&self) -> DashboardInfo
fn clone(&self) -> DashboardInfo
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 moreSource§impl Debug for DashboardInfo
impl Debug for DashboardInfo
impl Eq for DashboardInfo
Source§impl PartialEq for DashboardInfo
impl PartialEq for DashboardInfo
impl StructuralPartialEq for DashboardInfo
Auto Trait Implementations§
impl Freeze for DashboardInfo
impl RefUnwindSafe for DashboardInfo
impl Send for DashboardInfo
impl Sync for DashboardInfo
impl Unpin for DashboardInfo
impl UnsafeUnpin for DashboardInfo
impl UnwindSafe for DashboardInfo
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