pub struct CompiledChart { /* private fields */ }Expand description
A validated chart flattened into tables for the step kernel.
Implementations§
Source§impl CompiledChart
impl CompiledChart
Sourcepub fn new(chart: Chart) -> Result<Self, Vec<Violation>>
pub fn new(chart: Chart) -> Result<Self, Vec<Violation>>
Validate and compile a chart. Fails with every well-formedness violation.
Sourcepub fn datamodel(&self) -> &str
pub fn datamodel(&self) -> &str
The datamodel name the chart requires ("null" when it names none).
Sourcepub fn transitions(&self) -> &[CTransition]
pub fn transitions(&self) -> &[CTransition]
All transitions.
Sourcepub fn transition(&self, t: TransIdx) -> &CTransition
pub fn transition(&self, t: TransIdx) -> &CTransition
One transition.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the chart has no states besides the root (never true for a valid chart).
Sourcepub fn index_of(&self, id: &str) -> Option<StateIdx>
pub fn index_of(&self, id: &str) -> Option<StateIdx>
The index of the state with this identifier.
Sourcepub fn is_descendant(&self, d: StateIdx, a: StateIdx) -> bool
pub fn is_descendant(&self, d: StateIdx, a: StateIdx) -> bool
Whether d is a proper descendant of a.
Sourcepub fn default_entry(&self, s: StateIdx) -> &[StateIdx]
pub fn default_entry(&self, s: StateIdx) -> &[StateIdx]
The resolved default entry of a compound state or the root, as state indices.
Trait Implementations§
Source§impl Clone for CompiledChart
impl Clone for CompiledChart
Auto Trait Implementations§
impl Forget for CompiledChart
impl Freeze for CompiledChart
impl Move for CompiledChart
impl RefUnwindSafe for CompiledChart
impl Send for CompiledChart
impl Sync for CompiledChart
impl Unpin for CompiledChart
impl UnsafeUnpin for CompiledChart
impl UnwindSafe for CompiledChart
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