pub struct CommandMeta<L: AccessLevel> {
pub id: &'static str,
pub name: &'static str,
pub description: &'static str,
pub access_level: L,
pub kind: CommandKind,
pub min_args: usize,
pub max_args: usize,
}Expand description
Command metadata (const-initializable, no execution logic).
Execution via CommandHandler trait enables sync and async commands with const-initialization.
Unique id field allows duplicate names across directories.
Fields§
§id: &'static strUnique identifier for handler dispatch (must be unique across entire tree). Convention: use path-like IDs (e.g., “system_reboot”, “network_reboot”).
name: &'static strCommand name (display name, can duplicate across directories)
description: &'static strCommand description (shown by ls command)
access_level: LMinimum access level required
kind: CommandKindCommand kind (sync or async marker)
min_args: usizeMinimum number of arguments
max_args: usizeMaximum number of arguments
Trait Implementations§
Source§impl<L: Clone + AccessLevel> Clone for CommandMeta<L>
impl<L: Clone + AccessLevel> Clone for CommandMeta<L>
Source§fn clone(&self) -> CommandMeta<L>
fn clone(&self) -> CommandMeta<L>
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 moreAuto Trait Implementations§
impl<L> Freeze for CommandMeta<L>where
L: Freeze,
impl<L> RefUnwindSafe for CommandMeta<L>where
L: RefUnwindSafe,
impl<L> Send for CommandMeta<L>where
L: Send,
impl<L> Sync for CommandMeta<L>where
L: Sync,
impl<L> Unpin for CommandMeta<L>where
L: Unpin,
impl<L> UnsafeUnpin for CommandMeta<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for CommandMeta<L>where
L: UnwindSafe,
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