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>;
}