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
use crate::dot::DotString;
use std::borrow::Cow;
pub enum PageDirection {
BottomLeft,
BottomRight,
TopLeft,
TopRight,
RightBottom,
RightTop,
LeftBottom,
LeftTop,
}
impl<'a> DotString<'a> for PageDirection {
fn dot_string(&self) -> Cow<'a, str> {
match self {
PageDirection::BottomLeft => "BL".into(),
PageDirection::BottomRight => "BR".into(),
PageDirection::TopLeft => "TL".into(),
PageDirection::TopRight => "TR".into(),
PageDirection::RightBottom => "RB".into(),
PageDirection::RightTop => "RT".into(),
PageDirection::LeftBottom => "LB".into(),
PageDirection::LeftTop => "LT".into(),
}
}
}