pub struct ModelDescription {
pub public: bool,
pub params: &'static [&'static str],
pub attrs: &'static [&'static str],
pub any_inputs: Option<bool>,
pub trigger: Option<&'static [&'static str]>,
pub persistent: Option<&'static [&'static str]>,
}Expand description
Description of a single model in Meta
§Example implementation
use mosaik_api::types::ModelDescription;
const foo: ModelDescription = ModelDescription {
public: true,
params: &["init_val"],
attrs: &["delta", "val"],
trigger: Some(&["delta"]),
any_inputs: None,
persistent: None,
};Fields§
§public: boolWhether the model can be created directly.
params: &'static [&'static str]The parameters given during creating of this model.
attrs: &'static [&'static str]The input and output attributes of this model.
any_inputs: Option<bool>Whether this model accepts inputs other than those specified in attrs.
trigger: Option<&'static [&'static str]>The input attributes that trigger a step of the associated simulator. (Non-trigger attributes are collected and supplied to the simulator when it steps next.)
persistent: Option<&'static [&'static str]>The output attributes that are persistent.
Implementations§
Trait Implementations§
Source§impl Clone for ModelDescription
impl Clone for ModelDescription
Source§fn clone(&self) -> ModelDescription
fn clone(&self) -> ModelDescription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelDescription
impl Debug for ModelDescription
Source§impl Default for ModelDescription
impl Default for ModelDescription
Source§fn default() -> ModelDescription
fn default() -> ModelDescription
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModelDescription
impl PartialEq for ModelDescription
Source§impl Serialize for ModelDescription
impl Serialize for ModelDescription
impl StructuralPartialEq for ModelDescription
Auto Trait Implementations§
impl Freeze for ModelDescription
impl RefUnwindSafe for ModelDescription
impl Send for ModelDescription
impl Sync for ModelDescription
impl Unpin for ModelDescription
impl UnwindSafe for ModelDescription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more