pub struct Runtime { /* private fields */ }Expand description
The persisted final runtime graph and all framework-owned runtime facts.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn new(
robot: Robot,
artifacts: BTreeMap<ParticipantArtifactId, BinaryReference>,
participants: Vec<RuntimeParticipant>,
assets: AssetIndex,
) -> Result<Self, DocumentError>
pub fn new( robot: Robot, artifacts: BTreeMap<ParticipantArtifactId, BinaryReference>, participants: Vec<RuntimeParticipant>, assets: AssetIndex, ) -> Result<Self, DocumentError>
Construct the complete in-memory runtime document, validating its cross-field invariants exactly once.
Sourcepub fn artifacts(&self) -> &BTreeMap<ParticipantArtifactId, BinaryReference>
pub fn artifacts(&self) -> &BTreeMap<ParticipantArtifactId, BinaryReference>
The reusable executable artifacts retained by this runtime.
Sourcepub fn participants(&self) -> &[RuntimeParticipant]
pub fn participants(&self) -> &[RuntimeParticipant]
The final participant set, in persisted order.
Sourcepub const fn assets(&self) -> &AssetIndex
pub const fn assets(&self) -> &AssetIndex
The participant-readable asset index.
Sourcepub fn framework_line(&self) -> CompatibilityLine
pub fn framework_line(&self) -> CompatibilityLine
The one compatibility line every launched participant was built on.
This is the line, not a version, because that is all the document can
honestly promise: validation proves the selected artifacts share a
line, and they may have been built from different trains on it. The
exact train behind each artifact stays readable through
Self::artifacts, which is where a provenance report or a diagnostic
reads it from.
Runtime construction proves this invariant and every valid runtime has a brain participant, so the lookup cannot fail after validation.