pub struct CodebaseDoc { /* private fields */ }Expand description
Stable export model for the linked compiled machine inventory.
Implementations§
Source§impl CodebaseDoc
impl CodebaseDoc
Sourcepub fn linked() -> Result<Self, CodebaseDocError>
pub fn linked() -> Result<Self, CodebaseDocError>
Builds a combined codebase document from every linked machine visible to the current build.
Sourcepub fn try_from_linked(
linked: &'static [LinkedMachineGraph],
) -> Result<Self, CodebaseDocError>
pub fn try_from_linked( linked: &'static [LinkedMachineGraph], ) -> Result<Self, CodebaseDocError>
Builds a combined codebase document from an explicit linked machine inventory.
Sourcepub fn try_from_linked_with_validator_entries(
linked: &'static [LinkedMachineGraph],
validator_entries: &'static [LinkedValidatorEntryDescriptor],
) -> Result<Self, CodebaseDocError>
pub fn try_from_linked_with_validator_entries( linked: &'static [LinkedMachineGraph], validator_entries: &'static [LinkedValidatorEntryDescriptor], ) -> Result<Self, CodebaseDocError>
Builds a combined codebase document from explicit linked machine and validator-entry inventories.
Sourcepub fn machines(&self) -> &[CodebaseMachine]
pub fn machines(&self) -> &[CodebaseMachine]
Exported machines in stable codebase order.
Sourcepub fn links(&self) -> &[CodebaseLink]
pub fn links(&self) -> &[CodebaseLink]
Resolved static cross-machine links in stable order.
Sourcepub fn relations(&self) -> &[CodebaseRelation]
pub fn relations(&self) -> &[CodebaseRelation]
Resolved exact static relations in stable order.
Sourcepub fn machine(&self, index: usize) -> Option<&CodebaseMachine>
pub fn machine(&self, index: usize) -> Option<&CodebaseMachine>
Returns one exported machine by its stable codebase index.
Sourcepub fn relation(&self, index: usize) -> Option<&CodebaseRelation>
pub fn relation(&self, index: usize) -> Option<&CodebaseRelation>
Returns one exported relation by its stable codebase index.
Sourcepub fn machine_relation_groups(&self) -> &[CodebaseMachineRelationGroup]
pub fn machine_relation_groups(&self) -> &[CodebaseMachineRelationGroup]
Groups exact relations by source and target machine for renderer and inspector use.
Sourcepub fn composition_relation_groups(&self) -> Vec<CodebaseMachineRelationGroup>
pub fn composition_relation_groups(&self) -> Vec<CodebaseMachineRelationGroup>
Groups exact relations that are owned by composition machines.
Sourcepub fn outbound_relations_for_machine(
&self,
machine_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn outbound_relations_for_machine( &self, machine_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose source belongs to machine_index.
Sourcepub fn inbound_relations_for_machine(
&self,
machine_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn inbound_relations_for_machine( &self, machine_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose target belongs to machine_index.
Sourcepub fn outbound_relations_for_state(
&self,
machine_index: usize,
state_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn outbound_relations_for_state( &self, machine_index: usize, state_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose source belongs to one exported state.
Sourcepub fn inbound_relations_for_state(
&self,
machine_index: usize,
state_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn inbound_relations_for_state( &self, machine_index: usize, state_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose target belongs to one exported state.
Sourcepub fn outbound_relations_for_transition(
&self,
machine_index: usize,
transition_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn outbound_relations_for_transition( &self, machine_index: usize, transition_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose source belongs to one exported transition site.
Sourcepub fn inbound_relations_for_transition(
&self,
machine_index: usize,
transition_index: usize,
) -> impl Iterator<Item = &CodebaseRelation> + '_
pub fn inbound_relations_for_transition( &self, machine_index: usize, transition_index: usize, ) -> impl Iterator<Item = &CodebaseRelation> + '_
Exact relations whose target belongs to one exported transition site.
The current exact relation surface never targets transitions, so this iterator is always empty. It exists so the inspector can use the same navigation API shape for machines, states, and transitions.
Sourcepub fn relation_detail(
&self,
index: usize,
) -> Option<CodebaseRelationDetail<'_>>
pub fn relation_detail( &self, index: usize, ) -> Option<CodebaseRelationDetail<'_>>
Resolves one exact relation into typed source and target references for downstream consumers such as the inspector TUI.
Trait Implementations§
Source§impl Clone for CodebaseDoc
impl Clone for CodebaseDoc
Source§fn clone(&self) -> CodebaseDoc
fn clone(&self) -> CodebaseDoc
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more