summaryrefslogtreecommitdiff
path: root/src/attributes/direction.rs
diff options
context:
space:
mode:
authorseancarroll <seanc28@gmail.com>2021-01-06 21:11:57 -0600
committerseancarroll <seanc28@gmail.com>2021-01-06 21:11:57 -0600
commitc95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16 (patch)
treecfc0db9248e14f2ea675cf3b6dc67bf7243d1701 /src/attributes/direction.rs
parent0c8eb45449e578cae1f27e93df3f9cc92ba68219 (diff)
downloaddotavious-c95ff86e2c8fbdd8e0cf6550aadc7ffc676dcc16.zip
trying to organize files and use declarations
Diffstat (limited to 'src/attributes/direction.rs')
-rw-r--r--src/attributes/direction.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/attributes/direction.rs b/src/attributes/direction.rs
new file mode 100644
index 0000000..bebc3c0
--- /dev/null
+++ b/src/attributes/direction.rs
@@ -0,0 +1,20 @@
+use crate::dot::DotString;
+use std::borrow::Cow;
+
+pub enum Direction {
+ Forward,
+ Back,
+ Both,
+ None,
+}
+
+impl<'a> DotString<'a> for Direction {
+ fn dot_string(&self) -> Cow<'a, str> {
+ match self {
+ Direction::Forward => "forward".into(),
+ Direction::Back => "back".into(),
+ Direction::Both => "both".into(),
+ Direction::None => "none".into(),
+ }
+ }
+}