pub struct Directory<L: AccessLevel> {
pub name: &'static str,
pub children: &'static [Node<L>],
pub access_level: L,
}Expand description
Directory node containing child nodes (const-initializable, stored in ROM). Organizes commands hierarchically.
Fields§
§name: &'static strDirectory name
children: &'static [Node<L>]Child nodes (commands and subdirectories)
access_level: LMinimum access level required to access this directory
Implementations§
Source§impl<L: AccessLevel> Directory<L>
impl<L: AccessLevel> Directory<L>
Sourcepub fn find_child(&self, name: &str) -> Option<&Node<L>>
pub fn find_child(&self, name: &str) -> Option<&Node<L>>
Find child node by name (no access control, returns None if not found).
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for Directory<L>where
L: Freeze,
impl<L> RefUnwindSafe for Directory<L>where
L: RefUnwindSafe,
impl<L> Send for Directory<L>
impl<L> Sync for Directory<L>where
L: Sync,
impl<L> Unpin for Directory<L>where
L: Unpin,
impl<L> UnsafeUnpin for Directory<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for Directory<L>where
L: UnwindSafe + RefUnwindSafe,
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