pub struct Model { /* private fields */ }Expand description
DEVS model builder
§Hierarchical Composition
let root = Model::default()
.with_submodel("child", child_model)
.with_input_coupling(("in", "child", "in"))
.with_output_coupling(("child", "out", "out"));Implementations§
Source§impl Model
impl Model
Sourcepub fn with_dynamic<T: Dynamic + 'static>(self, dynamic: T) -> Self
pub fn with_dynamic<T: Dynamic + 'static>(self, dynamic: T) -> Self
Adds dynamic behavior
Sourcepub fn with_input_ports(self, input_ports: Vec<&str>) -> Self
pub fn with_input_ports(self, input_ports: Vec<&str>) -> Self
Creates input port coupling
Sourcepub fn with_output_ports(self, output_ports: Vec<&str>) -> Self
pub fn with_output_ports(self, output_ports: Vec<&str>) -> Self
Creates output port coupling
Sourcepub fn with_submodel(self, submodel_name: &str, submodel: Model) -> Self
pub fn with_submodel(self, submodel_name: &str, submodel: Model) -> Self
Sourcepub fn with_input_coupling(self, input_coupling: (&str, &str, &str)) -> Self
pub fn with_input_coupling(self, input_coupling: (&str, &str, &str)) -> Self
Creates input coupling
pub fn with_internal_coupling( self, internal_coupling: (&str, &str, &str, &str), ) -> Self
pub fn with_output_coupling(self, output_coupling: (&str, &str, &str)) -> Self
pub fn with_observer<T: Observer + 'static>( self, observer_name: &str, observer: T, ) -> Self
pub fn check(&self) -> Result<(), ()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl !RefUnwindSafe for Model
impl Send for Model
impl !Sync for Model
impl Unpin for Model
impl !UnwindSafe for Model
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