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