Trait Iso
functor::isomorphism
pub trait Iso<A, B> { fn to(&self, _: A) -> B; fn from(&self, _: B) -> A; }
fn to(&self, _: A) -> B
fn from(&self, _: B) -> A
impl<A, B, F, G> Iso<A, B> for (F, G) where F: Fn(A) -> B, G: Fn(B) -> A,