lispify/traits/mod.rs
1use crate::Lisp;
2
3/// A trait for converting a type into a lisp data structure
4pub trait Lispify {
5 /// The output type
6 type Output: Into<Lisp>;
7 /// Convert `self` into a lisp data structure
8 fn lispify(&self) -> Self::Output;
9}
10
11impl Lispify for Lisp {
12 type Output = Lisp;
13
14 fn lispify(&self) -> Self::Output {
15 self.clone()
16 }
17}