Expand description
CLI-specific types and utilities.
This module provides strong types for CLI concepts following Microsoft Rust Guidelines, ensuring type safety and clear intent throughout the CLI codebase.
§Design Principles
- Strong types over primitives (no raw strings/ints for domain concepts)
- All types are
Send + Sync + Debug - Validation at construction boundaries
- User-friendly error messages
§Examples
use mcp_execution_core::cli::{OutputFormat, ExitCode, ServerConnectionString};
use std::path::PathBuf;
// Output format selection
let format = OutputFormat::Pretty;
assert_eq!(format.as_str(), "pretty");
// Exit codes with semantic meaning
let code = ExitCode::SUCCESS;
assert_eq!(code.as_i32(), 0);
// Validated server connection strings
let conn = ServerConnectionString::new("github").unwrap();
assert_eq!(conn.as_str(), "github");Structs§
- Exit
Code - CLI exit code with semantic meaning.
- Server
Connection String - Validated MCP server connection string.
Enums§
- Output
Format - CLI output format.