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/arrow_type.rs | |
parent | 0c8eb45449e578cae1f27e93df3f9cc92ba68219 (diff) | |
download | dotavious-c95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16.zip |
trying to organize files and use declarations
Diffstat (limited to 'src/attributes/arrow_type.rs')
-rw-r--r-- | src/attributes/arrow_type.rs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/attributes/arrow_type.rs b/src/attributes/arrow_type.rs new file mode 100644 index 0000000..ac2d49f --- /dev/null +++ b/src/attributes/arrow_type.rs @@ -0,0 +1,50 @@ +use crate::dot::DotString; +use std::borrow::Cow; + +pub enum ArrowType { + Normal, + Dot, + Odot, + None, + Empty, + Diamond, + Ediamond, + Box, + Open, + Vee, + Inv, + Invdot, + Invodot, + Tee, + Invempty, + Odiamond, + Crow, + Obox, + Halfopen, +} + +impl<'a> DotString<'a> for ArrowType { + fn dot_string(&self) -> Cow<'a, str> { + match self { + ArrowType::Normal => "normal".into(), + ArrowType::Dot => "dot".into(), + ArrowType::Odot => "odot".into(), + ArrowType::None => "none".into(), + ArrowType::Empty => "empty".into(), + ArrowType::Diamond => "diamond".into(), + ArrowType::Ediamond => "ediamond".into(), + ArrowType::Box => "box".into(), + ArrowType::Open => "open".into(), + ArrowType::Vee => "vee".into(), + ArrowType::Inv => "inv".into(), + ArrowType::Invdot => "invdot".into(), + ArrowType::Invodot => "invodot".into(), + ArrowType::Tee => "tee".into(), + ArrowType::Invempty => "invempty".into(), + ArrowType::Odiamond => "odiamond".into(), + ArrowType::Crow => "crow".into(), + ArrowType::Obox => "obox".into(), + ArrowType::Halfopen => "halfopen".into(), + } + } +} |