Skip to main content

oxilean_parse/notation_system/
notationpart_traits.rs

1//! # NotationPart - Trait Implementations
2//!
3//! This module contains trait implementations for `NotationPart`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::NotationPart;
12
13impl std::fmt::Display for NotationPart {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15        match self {
16            NotationPart::Literal(s) => write!(f, "\"{}\"", s),
17            NotationPart::Placeholder(s) => write!(f, "{}", s),
18            NotationPart::Prec(p) => write!(f, ":{}", p),
19        }
20    }
21}