Trait ModelInterface

Source
pub trait ModelInterface: Sized {
    type Fact: FactInterface;
    type Runnable: RunnableInterface;
    type Value: ValueInterface;

Show 19 methods // Required methods 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 set_output_names( &mut self, outputs: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<()>; fn input_fact(&self, id: usize) -> Result<Self::Fact>; fn output_fact(&self, id: usize) -> Result<Self::Fact>; fn declutter(&mut self) -> Result<()>; fn optimize(&mut self) -> Result<()>; fn into_decluttered(self) -> Result<Self>; fn into_optimized(self) -> Result<Self>; fn into_runnable(self) -> Result<Self::Runnable>; fn concretize_symbols( &mut self, values: impl IntoIterator<Item = (impl AsRef<str>, i64)>, ) -> Result<()>; fn transform(&mut self, transform: &str) -> Result<()>; fn pulse( &mut self, name: impl AsRef<str>, value: impl AsRef<str>, ) -> Result<()>; fn cost_json(&self) -> Result<String>; fn profile_json<I, V, E>(&self, inputs: Option<I>) -> Result<String> where I: IntoIterator<Item = V>, V: TryInto<Self::Value, Error = E>, E: Into<Error> + Debug; fn property_keys(&self) -> Result<Vec<String>>; fn property(&self, name: impl AsRef<str>) -> Result<Self::Value>;
}

Required Associated Types§

Required Methods§

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 set_output_names( &mut self, outputs: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<()>

Source

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

Source

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

Source

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

Source

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

Source

fn into_decluttered(self) -> Result<Self>

Source

fn into_optimized(self) -> Result<Self>

Source

fn into_runnable(self) -> Result<Self::Runnable>

Source

fn concretize_symbols( &mut self, values: impl IntoIterator<Item = (impl AsRef<str>, i64)>, ) -> Result<()>

Source

fn transform(&mut self, transform: &str) -> Result<()>

Source

fn pulse(&mut self, name: impl AsRef<str>, value: impl AsRef<str>) -> Result<()>

Source

fn cost_json(&self) -> Result<String>

Source

fn profile_json<I, V, E>(&self, inputs: Option<I>) -> Result<String>
where I: IntoIterator<Item = V>, V: TryInto<Self::Value, Error = E>, E: Into<Error> + Debug,

Source

fn property_keys(&self) -> Result<Vec<String>>

Source

fn property(&self, name: impl AsRef<str>) -> Result<Self::Value>

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§