aboutsummaryrefslogtreecommitdiff
path: root/src/guide.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/guide.rs')
-rw-r--r--src/guide.rs22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/guide.rs b/src/guide.rs
index 006566e..85d0594 100644
--- a/src/guide.rs
+++ b/src/guide.rs
@@ -1,7 +1,21 @@
1use crate::bitmap::Axis; 1use crate::{
2 bitmap::Axis,
3 lisp::{expr::LispExpr, number::LispNumber},
4};
2 5
3#[derive(Debug)] 6use std::convert::Into;
7
8#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)]
4pub struct Guide { 9pub struct Guide {
5 axis: Axis, 10 pub axis: Axis,
6 offset: u32, 11 pub offset: u32,
12}
13
14impl Into<LispExpr> for Guide {
15 fn into(self) -> LispExpr {
16 LispExpr::List(vec![
17 self.axis.into(),
18 LispExpr::Number(LispNumber::Integer(self.offset as i64)),
19 ])
20 }
7} 21}