pub struct PageDefinition {Show 16 fields
pub route: String,
pub title: String,
pub icon: Option<String>,
pub description: Option<String>,
pub show_in_menu: bool,
pub menu_order: i32,
pub parent_route: Option<String>,
pub requires_auth: bool,
pub permissions: Vec<String>,
pub roles: Vec<String>,
pub state: HashMap<String, StateFieldDefinition>,
pub computed: HashMap<String, String>,
pub sections: Vec<ComponentSchema>,
pub actions: HashMap<String, Action>,
pub hooks: Option<PageLifecycleHooks>,
pub dialogs: Vec<DialogDefinition>,
}Expand description
Enhanced page definition for plugin UI.
Fields§
§route: StringRoute path for the page.
title: StringPage title.
icon: Option<String>Icon name (from icon library).
description: Option<String>Page description.
Whether to show in navigation menu.
Menu order (lower = higher priority).
parent_route: Option<String>Parent route (for nested pages).
requires_auth: boolWhether authentication is required.
permissions: Vec<String>Required permissions to view page.
roles: Vec<String>Required roles to view page.
state: HashMap<String, StateFieldDefinition>Page-level state definition.
computed: HashMap<String, String>Computed values derived from state.
sections: Vec<ComponentSchema>Page sections/content.
actions: HashMap<String, Action>Page-level action definitions.
hooks: Option<PageLifecycleHooks>Page lifecycle hooks.
dialogs: Vec<DialogDefinition>Dialog definitions.
Implementations§
Trait Implementations§
Source§impl Clone for PageDefinition
impl Clone for PageDefinition
Source§fn clone(&self) -> PageDefinition
fn clone(&self) -> PageDefinition
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 moreSource§impl Debug for PageDefinition
impl Debug for PageDefinition
Source§impl<'de> Deserialize<'de> for PageDefinition
impl<'de> Deserialize<'de> for PageDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PageDefinition
impl RefUnwindSafe for PageDefinition
impl Send for PageDefinition
impl Sync for PageDefinition
impl Unpin for PageDefinition
impl UnwindSafe for PageDefinition
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