Trait StateTrait

Source
pub trait StateTrait {
    // Required methods
    fn id(&self) -> &str;
    fn state_type(&self) -> &StateType;
    fn parent(&self) -> Option<&str>;
    fn children(&self) -> &[String];
    fn initial(&self) -> Option<&str>;
    fn data(&self) -> Option<&Value>;
}
Expand description

Trait for state objects in a state machine

Required Methods§

Source

fn id(&self) -> &str

Get the unique identifier for this state

Source

fn state_type(&self) -> &StateType

Get the state type

Source

fn parent(&self) -> Option<&str>

Get the parent state id, if any

Source

fn children(&self) -> &[String]

Get child states (for compound and parallel states)

Source

fn initial(&self) -> Option<&str>

Get initial state id (for compound states)

Source

fn data(&self) -> Option<&Value>

Get data associated with this state

Implementors§