use crate::{
prelude::*,
map::Chain,
};
pub trait Map: Pack + Instance<MapClass> {
fn chain<M: Map>(self, other: M) -> Chain<Self, M> {
Chain::<Self, M>::new(self, other)
}
}
pub enum MapClass {}
impl Class for MapClass {
fn name() -> String {
"map".to_string()
}
fn methods() -> Vec<String> {
[
"rel",
"abs",
"rel_inv",
"abs_inv",
"norm",
]
.iter()
.map(|m| m.to_string())
.collect()
}
}