adminx-core 0.3.0

Framework-neutral core for the adminx admin-panel framework: the Resource trait, storage abstraction, registry, and neutral request/response types shared by every web-framework and database adapter.
Documentation
// adminx-core/src/menu.rs
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MenuItem {
    pub title: String,
    pub path: String,
    pub children: Option<Vec<MenuItem>>,
    pub icon: Option<String>,
    pub order: Option<usize>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum MenuAction {
    List,
    View,
    Create,
    Edit,
    Delete,
}

impl MenuAction {
    pub fn as_str(&self) -> &'static str {
        match self {
            MenuAction::List => "list",
            MenuAction::View => "view",
            MenuAction::Create => "create",
            MenuAction::Edit => "edit",
            MenuAction::Delete => "delete",
        }
    }
}