| 1 | //! Portable debug command group. Real host registration, event conversion and |
| 2 | //! I/O adapters live outside this movable source closure. |
| 3 | |
| 4 | pub use codewhale_command_contract::outcome::{DebugAction, DebugCommandResult as CommandResult}; |
| 5 | |
| 6 | pub mod balance; |
| 7 | pub mod cache; |
| 8 | pub mod cache_format; |
| 9 | pub mod change; |
| 10 | pub mod preview_request; |
| 11 | pub mod receipts; |
| 12 | pub mod tokens; |
| 13 | pub mod tool_inspection; |
| 14 | pub mod undo; |
| 15 | |
| 16 | #[cfg(test)] |
| 17 | mod operations_tests; |
| 18 | #[cfg(test)] |
| 19 | mod portable_tests; |
| 20 | |
| 21 | /// Complete group inventory, shared by extraction proof and host parity tests. |
| 22 | pub fn portable_handlers() -> [( |
| 23 | &'static codewhale_command_contract::metadata::CommandInfo, |
| 24 | codewhale_command_contract::handler::CommandHandler<CommandResult>, |
| 25 | ); 14] { |
| 26 | use codewhale_command_contract::metadata::RegisterCommand; |
| 27 | [ |
| 28 | (tokens::TokensCmd::info(), tokens::TokensCmd::handler()), |
| 29 | (tokens::CostCmd::info(), tokens::CostCmd::handler()), |
| 30 | ( |
| 31 | receipts::ReceiptsCmd::info(), |
| 32 | receipts::ReceiptsCmd::handler(), |
| 33 | ), |
| 34 | (balance::BalanceCmd::info(), balance::BalanceCmd::handler()), |
| 35 | (cache::CacheCmd::info(), cache::CacheCmd::handler()), |
| 36 | ( |
| 37 | preview_request::PreviewRequestCmd::info(), |
| 38 | preview_request::PreviewRequestCmd::handler(), |
| 39 | ), |
| 40 | ( |
| 41 | tool_inspection::ToolsCmd::info(), |
| 42 | tool_inspection::ToolsCmd::handler(), |
| 43 | ), |
| 44 | (change::ChangeCmd::info(), change::ChangeCmd::handler()), |
| 45 | (tokens::SystemCmd::info(), tokens::SystemCmd::handler()), |
| 46 | (tokens::ContextCmd::info(), tokens::ContextCmd::handler()), |
| 47 | (undo::EditCmd::info(), undo::EditCmd::handler()), |
| 48 | (undo::DiffCmd::info(), undo::DiffCmd::handler()), |
| 49 | (undo::UndoCmd::info(), undo::UndoCmd::handler()), |
| 50 | (undo::RetryCmd::info(), undo::RetryCmd::handler()), |
| 51 | ] |
| 52 | } |
| 53 |