summaryrefslogtreecommitdiff
path: root/src/attributes/direction.rs
blob: bebc3c04b3aa3d7e82d4336031c215d075d805ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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(),
        }
    }
}