Expand description
§daemon_console
A flexible console for daemon applications providing a terminal interface with command registration, history navigation, and colored logging.
§Examples
A simple way to create a TerminalApp instance.
use daemon_console::TerminalApp;
use std::io::stdout;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut app = TerminalApp::new();
Ok(())
}See more details in src/main.rs in source code.
Modules§
- logger
- Logging utilities with colored terminal output.
Macros§
- get_
critical - Macro for creating critical-level log messages.
- get_
debug - Macro for creating debug-level log messages.
- get_
error - Macro for creating error-level log messages.
- get_
info - Macro for creating info-level log messages.
- get_
warn - Macro for creating warning-level log messages.
Structs§
- Command
Result - Result from command execution
- Terminal
App - Main terminal application structure managing state and command execution.
Enums§
- AppAction
- Actions that can be sent from async commands to the main application
Traits§
- Async
Command Handler - Trait for asynchronous command handlers that can be registered with the terminal application.
- Command
Handler - Trait for synchronous command handlers that can be registered with the terminal application.