ImportSchemaBuilder

Trait ImportSchemaBuilder 

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

Source

fn inputs_schema(&self) -> Schema

Build the schema for the inputs of the model.

Source

fn outputs_schema(&self) -> Schema

Build the schema for the outputs of the model.

Source

fn continuous_inputs( &self, ) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Build a list of (Field, ValueReference) for the continuous inputs.

Source

fn discrete_inputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Build a list of Schema column (index, ValueReference) for the discrete inputs.

Source

fn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Build a list of Schema column (index, ValueReference) for the outputs.

Source

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.

Implementations on Foreign Types§

Source§

impl ImportSchemaBuilder for Fmi2Import
where Self::ValueRef: From<u32>,

Source§

fn inputs_schema(&self) -> Schema

Source§

fn outputs_schema(&self) -> Schema

Source§

fn continuous_inputs( &self, ) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Source§

fn discrete_inputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Source§

fn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Source§

fn parse_start_values( &self, start_values: &[String], ) -> Result<StartValues<Self::ValueRef>>

Source§

impl ImportSchemaBuilder for Fmi3Import
where Self::ValueRef: From<u32>,

Source§

fn inputs_schema(&self) -> Schema

Source§

fn outputs_schema(&self) -> Schema

Source§

fn continuous_inputs( &self, ) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Source§

fn discrete_inputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)> + '_

Source§

fn outputs(&self) -> impl Iterator<Item = (Field, Self::ValueRef)>

Source§

fn parse_start_values( &self, start_values: &[String], ) -> Result<StartValues<Self::ValueRef>>

Implementors§