pub struct CodebaseMachine {
pub index: usize,
pub module_path: &'static str,
pub rust_type_path: &'static str,
pub role: CodebaseMachineRole,
pub label: Option<&'static str>,
pub description: Option<&'static str>,
pub docs: Option<&'static str>,
pub states: Vec<CodebaseState>,
pub transitions: Vec<CodebaseTransition>,
pub validator_entries: Vec<CodebaseValidatorEntry>,
}Expand description
One machine family in the codebase export surface.
Fields§
§index: usizeStable codebase-local machine index.
module_path: &'static strmodule_path!() for the source module that owns the machine.
rust_type_path: &'static strFully qualified Rust type path for the machine family.
role: CodebaseMachineRoleWhether this machine is a local protocol machine or a composition machine.
label: Option<&'static str>Optional human-facing machine label.
description: Option<&'static str>Optional human-facing machine description.
docs: Option<&'static str>Optional longer-form source documentation from outer rustdoc comments.
states: Vec<CodebaseState>States exported in source order.
transitions: Vec<CodebaseTransition>Transition sites exported in deterministic order.
validator_entries: Vec<CodebaseValidatorEntry>Declared validator-entry surfaces exported in deterministic order.
Implementations§
Source§impl CodebaseMachine
impl CodebaseMachine
Sourcepub fn state(&self, index: usize) -> Option<&CodebaseState>
pub fn state(&self, index: usize) -> Option<&CodebaseState>
Returns one exported state by its stable state index.
Sourcepub fn state_named(&self, rust_name: &str) -> Option<&CodebaseState>
pub fn state_named(&self, rust_name: &str) -> Option<&CodebaseState>
Returns one exported state by its Rust state name.
Sourcepub fn validator_entry(&self, index: usize) -> Option<&CodebaseValidatorEntry>
pub fn validator_entry(&self, index: usize) -> Option<&CodebaseValidatorEntry>
Returns one exported validator-entry surface by its stable machine-local index.
Sourcepub fn transition(&self, index: usize) -> Option<&CodebaseTransition>
pub fn transition(&self, index: usize) -> Option<&CodebaseTransition>
Returns one exported transition site by its stable machine-local index.
Sourcepub fn node_id(&self, state_index: usize) -> String
pub fn node_id(&self, state_index: usize) -> String
Stable renderer node id for one state in this machine.
Sourcepub fn validator_node_id(&self, entry_index: usize) -> String
pub fn validator_node_id(&self, entry_index: usize) -> String
Stable renderer node id for one validator entry in this machine.
Trait Implementations§
Source§impl Clone for CodebaseMachine
impl Clone for CodebaseMachine
Source§fn clone(&self) -> CodebaseMachine
fn clone(&self) -> CodebaseMachine
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more