Skip to main content

Clock

Struct Clock 

Source
pub struct Clock(pub bool);
Expand description

A runtime clock type for FMU variables

Tuple Fields§

§0: bool

Trait Implementations§

Source§

impl Clone for Clock

Source§

fn clone(&self) -> Clock

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Clock

Source§

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

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

impl Default for Clock

Source§

fn default() -> Clock

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

impl Deref for Clock

Source§

type Target = bool

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Clock

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl FmiVariableBuilder for Clock

Source§

type Var = FmiClock

Source§

type Start = ()

Source§

fn finish(builder: VariableBuilder<Self>) -> Self::Var

Type-specific finish method that creates the concrete variable type. Read more
Source§

fn variable( name: impl Into<String>, value_reference: u32, ) -> VariableBuilder<Self>

Create a new variable builder with the given name.
Source§

impl<M: Model> ModelGetSet<M> for Clock

Source§

const FIELD_COUNT: usize = 1

The total number of primitive fields when flattened
Source§

fn get_clock( &mut self, vr: fmi3ValueReference, value: &mut fmi3Clock, _context: &dyn Context<M>, ) -> Result<(), Fmi3Error>

Get clock values from the model Note: For Output clocks, this method should reset the clock to false after reading
Source§

fn set_clock( &mut self, vr: fmi3ValueReference, value: &fmi3Clock, _context: &dyn Context<M>, ) -> Result<(), Fmi3Error>

Set clock values in the model
Source§

fn get_boolean( &self, _vr: fmi3ValueReference, _values: &mut [bool], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_boolean( &mut self, _vr: fmi3ValueReference, _values: &[bool], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_float32( &self, _vr: fmi3ValueReference, _values: &mut [f32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_float32( &mut self, _vr: fmi3ValueReference, _values: &[f32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_float64( &self, _vr: fmi3ValueReference, _values: &mut [f64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_float64( &mut self, _vr: fmi3ValueReference, _values: &[f64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_int8( &self, _vr: fmi3ValueReference, _values: &mut [i8], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_int8( &mut self, _vr: fmi3ValueReference, _values: &[i8], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_int16( &self, _vr: fmi3ValueReference, _values: &mut [i16], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_int16( &mut self, _vr: fmi3ValueReference, _values: &[i16], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_int32( &self, _vr: fmi3ValueReference, _values: &mut [i32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_int32( &mut self, _vr: fmi3ValueReference, _values: &[i32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_int64( &self, _vr: fmi3ValueReference, _values: &mut [i64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_int64( &mut self, _vr: fmi3ValueReference, _values: &[i64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_uint8( &self, _vr: fmi3ValueReference, _values: &mut [u8], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_uint8( &mut self, _vr: fmi3ValueReference, _values: &[u8], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_uint16( &self, _vr: fmi3ValueReference, _values: &mut [u16], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_uint16( &mut self, _vr: fmi3ValueReference, _values: &[u16], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_uint32( &self, _vr: fmi3ValueReference, _values: &mut [u32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_uint32( &mut self, _vr: fmi3ValueReference, _values: &[u32], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_uint64( &self, _vr: fmi3ValueReference, _values: &mut [u64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_uint64( &mut self, _vr: fmi3ValueReference, _values: &[u64], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_string( &self, _vr: fmi3ValueReference, _values: &mut [CString], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Get [<$name>] values from the model Returns the number of elements that were actually read
Source§

fn set_string( &mut self, _vr: fmi3ValueReference, _values: &[CString], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set [<$name>] values in the model Returns the number of elements that were actually written
Source§

fn get_binary( &self, _vr: fmi3ValueReference, _values: &mut [&mut [u8]], _context: &dyn Context<M>, ) -> Result<Vec<usize>, Fmi3Error>

Get binary values from the model Returns the sizes of the binary data that were actually read
Source§

fn set_binary( &mut self, _vr: fmi3ValueReference, _values: &[&[u8]], _context: &dyn Context<M>, ) -> Result<usize, Fmi3Error>

Set binary values in the model Returns the number of binary elements that were actually written
Source§

impl PartialEq for Clock

Source§

fn eq(&self, other: &Clock) -> 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 Copy for Clock

Source§

impl Eq for Clock

Source§

impl StructuralPartialEq for Clock

Auto Trait Implementations§

§

impl Freeze for Clock

§

impl RefUnwindSafe for Clock

§

impl Send for Clock

§

impl Sync for Clock

§

impl Unpin for Clock

§

impl UnwindSafe for Clock

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InitializeFromStart<T> for T

Source§

fn set_from_start(&mut self, value: T)

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.