pub enum OutputFormat {
Json,
Text,
Pretty,
}Expand description
CLI output format.
Determines how command results are formatted for user display. All formats provide the same information but with different presentation.
§Examples
use mcp_execution_core::cli::OutputFormat;
let format = OutputFormat::Json;
assert_eq!(format.as_str(), "json");
let format: OutputFormat = "pretty".parse().unwrap();
assert_eq!(format, OutputFormat::Pretty);Variants§
Json
JSON output for machine parsing
Text
Plain text output for scripts
Pretty
Pretty-printed output with colors for human reading
Implementations§
Source§impl OutputFormat
impl OutputFormat
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Returns the string representation of the format.
§Examples
use mcp_execution_core::cli::OutputFormat;
assert_eq!(OutputFormat::Json.as_str(), "json");
assert_eq!(OutputFormat::Text.as_str(), "text");
assert_eq!(OutputFormat::Pretty.as_str(), "pretty");Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputFormat
impl Debug for OutputFormat
Source§impl Default for OutputFormat
impl Default for OutputFormat
Source§fn default() -> OutputFormat
fn default() -> OutputFormat
Returns the “default value” for a type. Read more
Source§impl Display for OutputFormat
impl Display for OutputFormat
Source§impl FromStr for OutputFormat
impl FromStr for OutputFormat
Source§impl Hash for OutputFormat
impl Hash for OutputFormat
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
impl Copy for OutputFormat
impl Eq for OutputFormat
impl StructuralPartialEq for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnwindSafe for OutputFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more