pub struct DashboardLayoutConfig {
pub sidebar: SidebarProps,
pub header: HeaderProps,
pub sse_url: Option<String>,
}Expand description
Configuration for DashboardLayout.
Provides the per-application sidebar navigation and header data needed to render the persistent dashboard shell. Users construct this at app startup and register it with the layout registry.
§Example
use ferro_json_ui::{DashboardLayout, DashboardLayoutConfig, HeaderProps, SidebarProps, register_layout};
register_layout("dashboard", DashboardLayout::new(DashboardLayoutConfig {
sidebar: SidebarProps { fixed_top: vec![], groups: vec![], fixed_bottom: vec![] },
header: HeaderProps {
business_name: "My App".to_string(),
notification_count: None,
user_name: Some("Alice".to_string()),
user_avatar: None,
logout_url: Some("/logout".to_string()),
},
sse_url: None,
}));Fields§
Sidebar navigation data for the persistent sidebar shell.
header: HeaderPropsHeader data for the persistent header shell.
sse_url: Option<String>Optional SSE endpoint URL. When set, the JS runtime opens an
EventSource connection to this URL and dispatches live-value
and toast updates from incoming messages.
Auto Trait Implementations§
impl Freeze for DashboardLayoutConfig
impl RefUnwindSafe for DashboardLayoutConfig
impl Send for DashboardLayoutConfig
impl Sync for DashboardLayoutConfig
impl Unpin for DashboardLayoutConfig
impl UnsafeUnpin for DashboardLayoutConfig
impl UnwindSafe for DashboardLayoutConfig
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