summaryrefslogtreecommitdiffstats
path: root/src/pandoc/types.rs
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2019-11-23 19:27:21 +0100
committerMinijackson <minijackson@riseup.net>2019-11-23 19:31:58 +0100
commit860b73f1644ecd6548ae403ec483625fb7b625ea (patch)
tree1e0ab5ecf2a77a66e2a176364ecb151a58468426 /src/pandoc/types.rs
parent304d9f220cc208dd78fce11b703354ecd8d2168c (diff)
downloadposeidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.tar.gz
poseidoc-860b73f1644ecd6548ae403ec483625fb7b625ea.zip
entities rework, allow "inline" documentation, merge config with cli
Diffstat (limited to 'src/pandoc/types.rs')
-rw-r--r--src/pandoc/types.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/pandoc/types.rs b/src/pandoc/types.rs
deleted file mode 100644
index dc5be64..0000000
--- a/src/pandoc/types.rs
+++ /dev/null
@@ -1,39 +0,0 @@
1use crate::pandoc::{Block, Inline};
2
3#[derive(Debug, Clone)]
4pub(super) struct Class {
5 inners: Vec<Inner>,
6}
7
8#[derive(Debug, Clone)]
9struct Inner {
10 kind: InnerKind,
11 name: String,
12 //refid: String
13}
14
15#[derive(Debug, Clone)]
16enum InnerKind {
17 Class,
18 Enum,
19}
20
21impl std::fmt::Display for InnerKind {
22 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
23 match self {
24 InnerKind::Class => write!(f, "class"),
25 InnerKind::Enum => write!(f, "enum"),
26 }
27 }
28}
29
30impl From<Inner> for (Vec<Inline>, Vec<Vec<Block>>) {
31 fn from(inner: Inner) -> (Vec<Inline>, Vec<Vec<Block>>) {
32 (
33 vec![Inline::Str(inner.name)],
34 vec![vec![Block::Plain(vec![Inline::Str(
35 inner.kind.to_string(),
36 )])]],
37 )
38 }
39}