summaryrefslogtreecommitdiff
path: root/src/attributes/shape.rs
blob: 3c7469efe3e059abfda63b82254e76ea7c89e423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
use crate::dot::DotString;
use std::borrow::Cow;

pub enum Shape {
    Box,
    Polygon,
    Ellipse,
    Oval,
    Circle,
    Point,
    Egg,
    Triangle,
    Plaintext,
    Plain,
    Diamond,
    Trapezium,
    Parallelogram,
    House,
    Pentagon,
    Hexagon,
    Septagon,
    Octagon,
    DoubleCircle,
    DoubleOctagon,
    TripleOctagon,
    Invtriangle,
    Invtrapezium,
    Invhouse,
    Mdiamond,
    Msquare,
    Mcircle,
    Record,
    Rect,
    Rectangle,
    Square,
    Star,
    None,
    Underline,
    Cylinder,
    Note,
    Tab,
    Folder,
    Box3D,
    Component,
    Promoter,
    Cds,
    Terminator,
    Utr,
    Primersite,
    Restrictionsite,
    FivePoverHang,
    ThreePoverHang,
    NoverHang,
    Assemply,
    Signature,
    Insulator,
    Ribosite,
    Rnastab,
    Proteasesite,
    Proteinstab,
    Rpromotor,
    Rarrow,
    Larrow,
    Lpromotor,
}

impl<'a> DotString<'a> for Shape {
    fn dot_string(&self) -> Cow<'a, str> {
        match self {
            Shape::Box => "box".into(),
            Shape::Polygon => "polygon".into(),
            Shape::Ellipse => "ellipse".into(),
            Shape::Oval => "oval".into(),
            Shape::Circle => "circle".into(),
            Shape::Point => "point".into(),
            Shape::Egg => "egg".into(),
            Shape::Triangle => "triangle".into(),
            Shape::Plaintext => "plaintext".into(),
            Shape::Plain => "plain".into(),
            Shape::Diamond => "diamond".into(),
            Shape::Trapezium => "trapezium".into(),
            Shape::Parallelogram => "parallelogram".into(),
            Shape::House => "house".into(),
            Shape::Pentagon => "pentagon".into(),
            Shape::Hexagon => "hexagon".into(),
            Shape::Septagon => "septagon".into(),
            Shape::Octagon => "octagon".into(),
            Shape::DoubleCircle => "doublecircle".into(),
            Shape::DoubleOctagon => "doubleoctagon".into(),
            Shape::TripleOctagon => "tripleocctagon".into(),
            Shape::Invtriangle => "invtriangle".into(),
            Shape::Invtrapezium => "invtrapezium".into(),
            Shape::Invhouse => "invhouse".into(),
            Shape::Mdiamond => "Mdiamond".into(),
            Shape::Msquare => "Msquare".into(),
            Shape::Mcircle => "Mcircle".into(),
            Shape::Record => "record".into(),
            Shape::Rect => "rect".into(),
            Shape::Rectangle => "rectangle".into(),
            Shape::Square => "square".into(),
            Shape::Star => "star".into(),
            Shape::None => "none".into(),
            Shape::Underline => "underline".into(),
            Shape::Cylinder => "cylinder".into(),
            Shape::Note => "note".into(),
            Shape::Tab => "tab".into(),
            Shape::Folder => "folder".into(),
            Shape::Box3D => "box3d".into(),
            Shape::Component => "component".into(),
            Shape::Promoter => "promoter".into(),
            Shape::Cds => "cds".into(),
            Shape::Terminator => "terminator".into(),
            Shape::Utr => "utr".into(),
            Shape::Primersite => "primersite".into(),
            Shape::Restrictionsite => "restrictionsite".into(),
            Shape::FivePoverHang => "fivepoverhang".into(),
            Shape::ThreePoverHang => "threepoverhang".into(),
            Shape::NoverHang => "noverhang".into(),
            Shape::Assemply => "assemply".into(),
            Shape::Signature => "signature".into(),
            Shape::Insulator => "insulator".into(),
            Shape::Ribosite => "ribosite".into(),
            Shape::Rnastab => "rnastab".into(),
            Shape::Proteasesite => "proteasesite".into(),
            Shape::Proteinstab => "proteinstab".into(),
            Shape::Rpromotor => "rpromotor".into(),
            Shape::Rarrow => "rarrow".into(),
            Shape::Larrow => "larrow".into(),
            Shape::Lpromotor => "lpromotor".into(),
        }
    }
}