Trait tract_hir::internal::translator::Translate[][src]

pub trait Translate<TI1, O1, TI2, O2>: Debug where
    TI1: Fact + Hash + Clone + 'static,
    O1: Display + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + 'static + Hash,
    TI2: Fact + Hash + Clone + 'static,
    O2: Display + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + 'static + Hash
{ pub 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>; pub fn translate_model(
        &self,
        source: &Graph<TI1, O1>
    ) -> Result<Graph<TI2, O2>, Error> { ... }
pub fn translate_model_with_mappings(
        &self,
        source: &Graph<TI1, O1>
    ) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), Error> { ... } }

Required methods

pub 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>
[src]

Loading content...

Provided methods

pub fn translate_model(
    &self,
    source: &Graph<TI1, O1>
) -> Result<Graph<TI2, O2>, Error>
[src]

pub fn translate_model_with_mappings(
    &self,
    source: &Graph<TI1, O1>
) -> Result<(Graph<TI2, O2>, HashMap<OutletId, OutletId, RandomState>), Error>
[src]

Loading content...

Implementors

impl Translate<TypedFact, Box<dyn TypedOp + 'static, Global>, TypedFact, Box<dyn TypedOp + 'static, Global>> for SymbolValues[src]

impl<TI1, O1, TI2, O2, EO, ETI> Translate<TI1, O1, TI2, O2> for IntoTranslator where
    TI1: Fact + Hash + Clone + 'static,
    O1: Display + Debug + Clone + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + 'static + Hash,
    TI2: Fact + Hash + for<'a> TryFrom<&'a TI1, Error = EO> + Clone + 'static,
    O2: Display + for<'a> TryFrom<&'a O1, Error = ETI> + Debug + AsRef<dyn Op + 'static> + AsMut<dyn Op + 'static> + Clone + Hash + 'static,
    Error: From<EO>,
    Error: From<ETI>,
    Graph<TI2, O2>: SpecialOps<TI2, O2>, 
[src]

Loading content...