pub enum OutputMode {
Rich,
Plain,
Minimal,
}Expand description
Output rendering mode.
Variants§
Rich
Full rich_rust styling: colors, boxes, tables, unicode.
Plain
Plain text output with no ANSI codes or special characters.
Minimal
Colors only, no box characters or complex formatting.
Implementations§
Source§impl OutputMode
impl OutputMode
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Get the mode name as a static string.
Returns one of: "rich", "plain", or "minimal".
Sourcepub const fn is_agent_friendly(&self) -> bool
pub const fn is_agent_friendly(&self) -> bool
Check if this mode is agent-friendly (produces output suitable for parsing).
Returns true for Plain mode, which uses no ANSI codes and
consistent text prefixes like [OK], [ERROR], etc.
§Example
use fastapi_output::OutputMode;
assert!(OutputMode::Plain.is_agent_friendly());
assert!(!OutputMode::Rich.is_agent_friendly());
assert!(!OutputMode::Minimal.is_agent_friendly());Sourcepub const fn uses_colors(&self) -> bool
pub const fn uses_colors(&self) -> bool
Check if this mode uses ANSI color codes.
Sourcepub const fn uses_boxes(&self) -> bool
pub const fn uses_boxes(&self) -> bool
Check if this mode uses box-drawing characters.
Sourcepub const fn supports_tables(&self) -> bool
pub const fn supports_tables(&self) -> bool
Check if this mode supports tables.
Sourcepub const fn success_indicator(&self) -> &'static str
pub const fn success_indicator(&self) -> &'static str
Get the status indicator for success in this mode.
Sourcepub const fn error_indicator(&self) -> &'static str
pub const fn error_indicator(&self) -> &'static str
Get the status indicator for errors in this mode.
Sourcepub const fn warning_indicator(&self) -> &'static str
pub const fn warning_indicator(&self) -> &'static str
Get the status indicator for warnings in this mode.
Sourcepub const fn info_indicator(&self) -> &'static str
pub const fn info_indicator(&self) -> &'static str
Get the status indicator for info in this mode.
Sourcepub const fn is_minimal(&self) -> bool
pub const fn is_minimal(&self) -> bool
Check if this mode is minimal.
Trait Implementations§
Source§impl Clone for OutputMode
impl Clone for OutputMode
Source§fn clone(&self) -> OutputMode
fn clone(&self) -> OutputMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OutputMode
Source§impl Debug for OutputMode
impl Debug for OutputMode
Source§impl Default for OutputMode
impl Default for OutputMode
Source§fn default() -> OutputMode
fn default() -> OutputMode
Source§impl Display for OutputMode
impl Display for OutputMode
impl Eq for OutputMode
Source§impl FromStr for OutputMode
impl FromStr for OutputMode
Source§impl PartialEq for OutputMode
impl PartialEq for OutputMode
Source§fn eq(&self, other: &OutputMode) -> bool
fn eq(&self, other: &OutputMode) -> bool
self and other values to be equal, and is used by ==.