Trait tract_api::InferenceModelInterface 
source · pub trait InferenceModelInterface: Sized {
    type Model: ModelInterface;
    type InferenceFact: InferenceFactInterface;
    // Required methods
    fn set_output_names(
        &mut self,
        outputs: impl IntoIterator<Item = impl AsRef<str>>
    ) -> Result<()>;
    fn input_count(&self) -> Result<usize>;
    fn output_count(&self) -> Result<usize>;
    fn input_name(&self, id: usize) -> Result<String>;
    fn output_name(&self, id: usize) -> Result<String>;
    fn input_fact(&self, id: usize) -> Result<Self::InferenceFact>;
    fn set_input_fact(
        &mut self,
        id: usize,
        fact: impl AsFact<Self, Self::InferenceFact>
    ) -> Result<()>;
    fn output_fact(&self, id: usize) -> Result<Self::InferenceFact>;
    fn set_output_fact(
        &mut self,
        id: usize,
        fact: impl AsFact<Self, Self::InferenceFact>
    ) -> Result<()>;
    fn analyse(&mut self) -> Result<()>;
    fn into_typed(self) -> Result<Self::Model>;
    fn into_optimized(self) -> Result<Self::Model>;
}Required Associated Types§
Required Methods§
fn set_output_names( &mut self, outputs: impl IntoIterator<Item = impl AsRef<str>> ) -> Result<()>
fn input_count(&self) -> Result<usize>
fn output_count(&self) -> Result<usize>
fn input_name(&self, id: usize) -> Result<String>
fn output_name(&self, id: usize) -> Result<String>
fn input_fact(&self, id: usize) -> Result<Self::InferenceFact>
fn set_input_fact( &mut self, id: usize, fact: impl AsFact<Self, Self::InferenceFact> ) -> Result<()>
fn output_fact(&self, id: usize) -> Result<Self::InferenceFact>
fn set_output_fact( &mut self, id: usize, fact: impl AsFact<Self, Self::InferenceFact> ) -> Result<()>
fn analyse(&mut self) -> Result<()>
fn into_typed(self) -> Result<Self::Model>
fn into_optimized(self) -> Result<Self::Model>
Object Safety§
This trait is not object safe.