Skip to main content

vela_protocol/
permission.rs

1//! Permission metadata for the public frontier tool registry.
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
6pub enum PermissionLevel {
7    ReadOnly,
8    Write,
9    Dangerous,
10}
11
12impl std::fmt::Display for PermissionLevel {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14        match self {
15            Self::ReadOnly => write!(f, "read-only"),
16            Self::Write => write!(f, "write"),
17            Self::Dangerous => write!(f, "dangerous"),
18        }
19    }
20}