Skip to main content

ModelVariables

Struct ModelVariables 

Source
pub struct ModelVariables {
    pub variables: Vec<Variable>,
}

Fields§

§variables: Vec<Variable>

Implementations§

Source§

impl ModelVariables

Source

pub fn len(&self) -> usize

Returns the total number of variables in the model description

Source

pub fn is_empty(&self) -> bool

Source

pub fn iter_abstract(&self) -> impl Iterator<Item = &dyn AbstractVariableTrait>

Returns an iterator over all the AbstractVariables in the model description

Source

pub fn iter_floating( &self, ) -> impl Iterator<Item = &dyn TypedArrayableVariableTrait>

Returns an iterator over all the float32 and float64 variables in the model description

Source

pub fn find_by_name(&self, name: &str) -> Option<&dyn AbstractVariableTrait>

Finds a variable by its name.

Source

pub fn float32(&self) -> Vec<&FmiFloat32>

Returns a vector of all Float32 variables

Source

pub fn float64(&self) -> Vec<&FmiFloat64>

Returns a vector of all Float64 variables

Source

pub fn int8(&self) -> Vec<&FmiInt8>

Returns a vector of all Int8 variables

Source

pub fn uint8(&self) -> Vec<&FmiUInt8>

Returns a vector of all UInt8 variables

Source

pub fn int16(&self) -> Vec<&FmiInt16>

Returns a vector of all Int16 variables

Source

pub fn uint16(&self) -> Vec<&FmiUInt16>

Returns a vector of all UInt16 variables

Source

pub fn int32(&self) -> Vec<&FmiInt32>

Returns a vector of all Int32 variables

Source

pub fn uint32(&self) -> Vec<&FmiUInt32>

Returns a vector of all UInt32 variables

Source

pub fn int64(&self) -> Vec<&FmiInt64>

Returns a vector of all Int64 variables

Source

pub fn uint64(&self) -> Vec<&FmiUInt64>

Returns a vector of all UInt64 variables

Source

pub fn boolean(&self) -> Vec<&FmiBoolean>

Returns a vector of all Boolean variables

Source

pub fn string(&self) -> Vec<&FmiString>

Returns a vector of all String variables

Source

pub fn binary(&self) -> Vec<&FmiBinary>

Returns a vector of all Binary variables

Trait Implementations§

Source§

impl Debug for ModelVariables

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ModelVariables

Source§

fn default() -> ModelVariables

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ModelVariables

Source§

fn eq(&self, other: &ModelVariables) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl VariableCounts for ModelVariables

Source§

impl<'__input> XmlRead<'__input> for ModelVariables

Source§

fn from_reader(reader: &mut XmlReader<'__input>) -> XmlResult<Self>

Source§

fn from_str(text: &'a str) -> Result<Self, XmlError>

Source§

impl XmlWrite for ModelVariables

Source§

fn to_writer<W: Write>(&self, writer: &mut XmlWriter<W>) -> XmlResult<()>

Source§

fn to_string(&self) -> Result<String, XmlError>

Source§

impl StructuralPartialEq for ModelVariables

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> XmlReadOwned for T
where T: for<'s> XmlRead<'s>,