Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/presentation/user_output/channel.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//! Output channel routing for user-facing messages
//!
//! This module defines the channel enum that determines whether messages
//! should be written to stdout or stderr.

/// Output channel for routing messages
///
/// Determines whether a message should be written to stdout or stderr.
/// Following Unix conventions:
/// - **stdout**: Final results and structured data for piping/redirection
/// - **stderr**: Progress updates, status messages, operational info, errors
///
/// # Examples
///
/// ```rust
/// use torrust_tracker_deployer_lib::presentation::user_output::Channel;
///
/// let channel = Channel::Stdout;
/// assert_eq!(channel, Channel::Stdout);
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Channel {
/// Standard output stream for final results and data
Stdout,
/// Standard error stream for progress and operational messages
Stderr,
}
Loading