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,
router: Option<RuntimeRouterConfig>,
) -> Result<Self, DocumentError>
pub fn new( robot: Robot, artifacts: BTreeMap<ParticipantArtifactId, BinaryReference>, participants: Vec<RuntimeParticipant>, assets: AssetIndex, router: Option<RuntimeRouterConfig>, ) -> 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 const fn router(&self) -> Option<&RuntimeRouterConfig>
pub const fn router(&self) -> Option<&RuntimeRouterConfig>
Optional router configuration selected by build tooling.
Sourcepub fn robot_api(&self) -> RobotApiVersion
pub fn robot_api(&self) -> RobotApiVersion
The one Robot API revision selected by every launched participant.
Runtime construction proves this invariant and every valid runtime has a brain participant, so the lookup cannot fail after validation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Runtime
impl<'de> Deserialize<'de> for Runtime
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtime
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