pub struct SystemDescription {
pub message_id: Id,
pub valid_from: Timestamp,
pub operation_modes: Vec<OperationMode>,
pub transitions: Vec<Transition>,
pub timers: Vec<Timer>,
}Expand description
The state machine: every mode, every move between them, every timer.
Fields§
§message_id: IdThis message’s identifier.
valid_from: TimestampWhen this description becomes valid.
operation_modes: Vec<OperationMode>The states. At least one, at most a hundred.
transitions: Vec<Transition>The permitted moves.
timers: Vec<Timer>The timers those moves start or wait for.
Implementations§
Source§impl SystemDescription
impl SystemDescription
Sourcepub fn builder() -> SystemDescriptionBuilder
pub fn builder() -> SystemDescriptionBuilder
Create an instance of SystemDescription using the builder syntax
Source§impl SystemDescription
impl SystemDescription
Sourcepub fn operation_mode(&self, id: &Id) -> Option<&OperationMode>
pub fn operation_mode(&self, id: &Id) -> Option<&OperationMode>
The operation mode with this id, if the description has one.
Sourcepub fn timer(&self, id: &Id) -> Option<&Timer>
pub fn timer(&self, id: &Id) -> Option<&Timer>
The timer with this id, if the description has one.
Sourcepub fn transition(&self, from: &Id, to: &Id) -> Option<&Transition>
pub fn transition(&self, from: &Id, to: &Id) -> Option<&Transition>
The transition from from to to, if one is described.
Trait Implementations§
Source§impl Clone for SystemDescription
impl Clone for SystemDescription
Source§impl Debug for SystemDescription
impl Debug for SystemDescription
Source§impl<'de> Deserialize<'de> for SystemDescription
impl<'de> Deserialize<'de> for SystemDescription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SystemDescription> for Message
impl From<SystemDescription> for Message
Source§fn from(value: SystemDescription) -> Self
fn from(value: SystemDescription) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SystemDescription
impl PartialEq for SystemDescription
Source§impl Serialize for SystemDescription
impl Serialize for SystemDescription
impl StructuralPartialEq for SystemDescription
Auto Trait Implementations§
impl Forget for SystemDescription
impl Freeze for SystemDescription
impl RefUnwindSafe for SystemDescription
impl Send for SystemDescription
impl Sync for SystemDescription
impl Unpin for SystemDescription
impl UnsafeUnpin for SystemDescription
impl UnwindSafe for SystemDescription
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