diff options
Diffstat (limited to 'src/text.rs')
-rw-r--r-- | src/text.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/text.rs b/src/text.rs deleted file mode 100644 index e9dbdeb..0000000 --- a/src/text.rs +++ /dev/null @@ -1,30 +0,0 @@ -pub enum Text { - Normal(String), - Bold(String), - Italic(String), - BoldItalic(String), - Code(String), - WikiLink(String), - Hyperlink(Hyperlink), -} -impl std::fmt::Debug for Text { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - let string = match self { - Text::Normal(text) => format!("Normal ('{}')", text), - Text::Bold(text) => format!("Bold ('{}')", text), - Text::Italic(text) => format!("Italic ('{}')", text), - Text::BoldItalic(text) => format!("BoldItalic ('{}')", text), - Text::Code(text) => format!("Code ('{}')", text), - Text::WikiLink(text) => format!("WikiLink ('{}')", text), - Text::Hyperlink(Hyperlink { label, target }) => { - format!("Hyperlink (label:'{}', target:'{}')", label, target) - } - }; - f.write_str(&string) - } -} - -pub struct Hyperlink { - pub label: String, - pub target: String, -} |