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