pub trait StateInterface {
type Fact: FactInterface;
type Value: ValueInterface;
// Required methods
fn input_count(&self) -> Result<usize>;
fn output_count(&self) -> Result<usize>;
fn run<I, V, E>(&mut self, inputs: I) -> Result<Vec<Self::Value>>
where I: IntoIterator<Item = V>,
V: TryInto<Self::Value, Error = E>,
E: Into<Error>;
fn initializable_states_count(&self) -> Result<usize>;
fn get_states_facts(&self) -> Result<Vec<Self::Fact>>;
fn set_states<I, V, E>(&mut self, state_initializers: I) -> Result<()>
where I: IntoIterator<Item = V>,
V: TryInto<Self::Value, Error = E>,
E: Into<Error> + Debug;
fn get_states(&self) -> Result<Vec<Self::Value>>;
}
Required Associated Types§
type Fact: FactInterface
type Value: ValueInterface
Required Methods§
fn input_count(&self) -> Result<usize>
fn output_count(&self) -> Result<usize>
fn run<I, V, E>(&mut self, inputs: I) -> Result<Vec<Self::Value>>
fn initializable_states_count(&self) -> Result<usize>
fn get_states_facts(&self) -> Result<Vec<Self::Fact>>
fn set_states<I, V, E>(&mut self, state_initializers: I) -> Result<()>
fn get_states(&self) -> Result<Vec<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.