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.
Re-exports§
pub use crate::command::AsyncCommandHandler;pub use crate::command::AsyncUnknownCommandHandler;pub use crate::command::CommandHandler;pub use crate::command::CommandHandlerType;pub use crate::command::CommandResult;pub use crate::command::RunningCommand;pub use crate::command::UnknownCommandHandler;
Modules§
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§
- 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