返回 CodeWhale
mod.rs
根目录 / crates / tui / src / commands / groups / memory / mod.rs
1 //! Memory command area: persistent memory and quick notes.
2
3 // This group dir intentionally has a `memory.rs` child module with the same
4 // name. The module_inception allow is a permanent structure rationale, not
5 // migration scaffolding; see docs/architecture/command-dispatch.md.
6 #[allow(clippy::module_inception)]
7 mod memory;
8 mod note;
9
10 use crate::commands::traits::{Command, CommandGroup, FunctionCommand, RegisterCommand};
11
12 pub struct MemoryCommands;
13
14 impl CommandGroup for MemoryCommands {
15 fn commands(&self) -> &'static [Box<dyn Command>] {
16 cached_command_list!(vec![
17 Box::new(FunctionCommand::new(
18 note::NoteCmd::info(),
19 note::NoteCmd::execute,
20 )),
21 Box::new(FunctionCommand::new(
22 memory::MemoryCmd::info(),
23 memory::MemoryCmd::execute,
24 )),
25 ])
26 }
27 }
28
28 lines RUST