diff options
author | seancarroll <seanc28@gmail.com> | 2021-01-06 21:11:57 -0600 |
---|---|---|
committer | seancarroll <seanc28@gmail.com> | 2021-01-06 21:11:57 -0600 |
commit | c95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16 (patch) | |
tree | cfc0db9248e14f2ea675cf3b6dc67bf7243d1701 /src/attributes/shape.rs | |
parent | 0c8eb45449e578cae1f27e93df3f9cc92ba68219 (diff) | |
download | dotavious-c95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16.zip |
trying to organize files and use declarations
Diffstat (limited to 'src/attributes/shape.rs')
-rw-r--r-- | src/attributes/shape.rs | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/src/attributes/shape.rs b/src/attributes/shape.rs new file mode 100644 index 0000000..be37ccc --- /dev/null +++ b/src/attributes/shape.rs @@ -0,0 +1,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(), + } + } +} |