oxilean_parse/repl_parser/replevent_traits.rs
1//! # ReplEvent - Trait Implementations
2//!
3//! This module contains trait implementations for `ReplEvent`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::ReplEvent;
12
13impl std::fmt::Display for ReplEvent {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 match self {
16 ReplEvent::Parsed(s) => write!(f, "Parsed: {}", s),
17 ReplEvent::Error(s) => write!(f, "Error: {}", s),
18 ReplEvent::Reset => write!(f, "Reset"),
19 ReplEvent::OptionChanged(k, v) => write!(f, "Option {} = {}", k, v),
20 ReplEvent::Exit => write!(f, "Exit"),
21 }
22 }
23}