pub trait ImportSchemaBuilder: FmiImport {
// Required methods
fn inputs_schema(&self) -> Schema;
fn outputs_schema(&self) -> Schema;
fn continuous_inputs(
&self,
) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_;
fn discrete_inputs(
&self,
) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_;
fn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_;
fn parse_start_values(
&self,
start_values: &[String],
) -> Result<StartValues<Self::ValueRef>>;
}
Expand description
Interface for building the Arrow schema for the inputs and outputs of an FMU.
Required Methods§
Sourcefn inputs_schema(&self) -> Schema
fn inputs_schema(&self) -> Schema
Build the schema for the inputs of the model.
Sourcefn outputs_schema(&self) -> Schema
fn outputs_schema(&self) -> Schema
Build the schema for the outputs of the model.
Sourcefn continuous_inputs(
&self,
) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
fn continuous_inputs( &self, ) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
Build a list of (Field, ValueReference) for the continuous inputs.
Sourcefn discrete_inputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
fn discrete_inputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
Build a list of Schema column (index, ValueReference) for the discrete inputs.
Sourcefn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
fn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_
Build a list of Schema column (index, ValueReference) for the outputs.
Sourcefn parse_start_values(
&self,
start_values: &[String],
) -> Result<StartValues<Self::ValueRef>>
fn parse_start_values( &self, start_values: &[String], ) -> Result<StartValues<Self::ValueRef>>
Parse a list of “var=value” strings.
§Returns
A tuple of two lists of (ValueReference, Array) tuples. The first list contains any variable with
Causality = StructuralParameter
and the second list contains regular parameters.
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.