mathml_core/ast/
display.rs

1use super::*;
2
3impl Display for MathML {
4    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
5        match self {
6            MathML::Root(v) => Display::fmt(v, f),
7            MathML::Row(v) => Display::fmt(v, f),
8            MathML::Function(v) => Display::fmt(v, f),
9            MathML::Number(v) => Display::fmt(v, f),
10            MathML::Identifier(v) => Display::fmt(v, f),
11            MathML::Operator(v) => Display::fmt(v, f),
12            MathML::MultiScripts(v) => Display::fmt(v, f),
13            MathML::UnderOver(v) => Display::fmt(v, f),
14            MathML::Sqrt(v) => Display::fmt(v, f),
15            MathML::Frac(v) => Display::fmt(v, f),
16            MathML::Phantom(v) => Display::fmt(v, f),
17            MathML::Fenced(v) => Display::fmt(v, f),
18            MathML::Table(v) => Display::fmt(v, f),
19            MathML::Space(v) => Display::fmt(v, f),
20            MathML::Text(v) => Display::fmt(v, f),
21            MathML::Style(v) => Display::fmt(v, f),
22            MathML::Undefined(v) => Display::fmt(v, f),
23            MathML::Ampersand => Ok(()),
24            MathML::NewLine => Ok(()),
25            MathML::Nothing => Ok(()),
26        }
27    }
28}