Trait 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§

Source

fn set_output_names( &mut self, outputs: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<()>

Source

fn input_count(&self) -> Result<usize>

Source

fn output_count(&self) -> Result<usize>

Source

fn input_name(&self, id: usize) -> Result<String>

Source

fn output_name(&self, id: usize) -> Result<String>

Source

fn input_fact(&self, id: usize) -> Result<Self::InferenceFact>

Source

fn set_input_fact( &mut self, id: usize, fact: impl AsFact<Self, Self::InferenceFact>, ) -> Result<()>

Source

fn output_fact(&self, id: usize) -> Result<Self::InferenceFact>

Source

fn set_output_fact( &mut self, id: usize, fact: impl AsFact<Self, Self::InferenceFact>, ) -> Result<()>

Source

fn analyse(&mut self) -> Result<()>

Source

fn into_typed(self) -> Result<Self::Model>

Source

fn into_optimized(self) -> Result<Self::Model>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§