pub trait Translate<TI1, O1, TI2, O2>: Debug where
TI1: 'static + Fact + Hash + Clone,
TI2: 'static + Fact + Hash + Clone,
O1: 'static + Display + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash,
O2: 'static + Display + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash, {
fn translate_node(
&self,
source: &Graph<TI1, O1>,
node: &Node<TI1, O1>,
target: &mut Graph<TI2, O2>,
mapping: &HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, Error>;
fn translate_model(
&self,
source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, Error> { ... }
fn translate_model_with_mappings(
&self,
source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), Error> { ... }
}