oxilean_parse/command/openitem_traits.rs
1//! # OpenItem - Trait Implementations
2//!
3//! This module contains trait implementations for `OpenItem`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::OpenItem;
12
13impl std::fmt::Display for OpenItem {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 match self {
16 OpenItem::All => write!(f, "*"),
17 OpenItem::Only(names) => write!(f, "only [{}]", names.join(", ")),
18 OpenItem::Hiding(names) => write!(f, "hiding [{}]", names.join(", ")),
19 OpenItem::Renaming(old, new) => write!(f, "{} -> {}", old, new),
20 }
21 }
22}