返回 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 pub(crate) use note::{notes_path, read_notes};
11
12 use crate::commands::traits::{CommandGroup, ContextualCommand};
13
14 pub struct MemoryCommands;
15
16 impl CommandGroup for MemoryCommands {
17 fn commands(&self) -> &'static [Box<dyn crate::commands::traits::Command>] {
18 cached_command_list!(vec![
19 Box::new(
20 ContextualCommand::from_contract::<note::NoteCmd>().expect("note registration"),
21 ),
22 Box::new(
23 ContextualCommand::from_contract::<memory::MemoryCmd>()
24 .expect("memory registration"),
25 ),
26 ])
27 }
28 }
29
29 lines RUST