pub struct Runtime<E> { /* private fields */ }Implementations§
Source§impl<E> Runtime<E>where
E: LocalExecutor,
impl<E> Runtime<E>where
E: LocalExecutor,
pub fn execute_workflow( &self, request: WorkflowExecutionRequest, ) -> WorkflowExecutionOutcome
Source§impl<E> Runtime<E>
impl<E> Runtime<E>
pub fn new(registry: CapabilityRegistry, executor: E) -> Self
pub fn with_workflow_registry(self, workflow_registry: WorkflowRegistry) -> Self
pub fn with_workspace_applications( self, applications: Vec<WorkspaceApplicationRegistration>, ) -> Self
Sourcepub fn from_workspace_app_state(
workspace_root: &Path,
workspace_id: &str,
executor: E,
validator_version: &str,
) -> Result<Self, WorkspaceAppStateFailure>
pub fn from_workspace_app_state( workspace_root: &Path, workspace_id: &str, executor: E, validator_version: &str, ) -> Result<Self, WorkspaceAppStateFailure>
Loads a runtime from durable local workspace app registration state.
§Errors
Returns WorkspaceAppStateFailure when the workspace has no app
registration state, state is malformed or incompatible, or registry
reconstruction fails validation.
pub fn with_observability_config( self, observability: RuntimeObservabilityConfig, ) -> Self
pub fn observability_config(&self) -> &RuntimeObservabilityConfig
pub fn with_security_config(self, security: RuntimeSecurityConfig) -> Self
Sourcepub fn with_event_sink(self, event_sink: Arc<dyn RuntimeEventSink>) -> Self
pub fn with_event_sink(self, event_sink: Arc<dyn RuntimeEventSink>) -> Self
Configures delivery for runtime-owned lifecycle envelopes.
Sourcepub fn with_event_broker(self, event_broker: Arc<dyn EventBroker>) -> Self
pub fn with_event_broker(self, event_broker: Arc<dyn EventBroker>) -> Self
Injects the EventBroker used by PlacementRouter Step 5.
Sourcepub fn with_trace_store(self, trace_store: Arc<Mutex<TraceStore>>) -> Self
pub fn with_trace_store(self, trace_store: Arc<Mutex<TraceStore>>) -> Self
Injects the TraceStore written by PlacementRouter Step 4.
Sourcepub fn event_broker(&self) -> Arc<dyn EventBroker> ⓘ
pub fn event_broker(&self) -> Arc<dyn EventBroker> ⓘ
Returns the runtime-owned event broker used for capability event publishing.
Sourcepub fn trace_store(&self) -> Arc<Mutex<TraceStore>> ⓘ
pub fn trace_store(&self) -> Arc<Mutex<TraceStore>> ⓘ
Returns the runtime-owned placement-router trace store.
pub fn security_config(&self) -> &RuntimeSecurityConfig
Sourcepub fn capability_registry(&self) -> &CapabilityRegistry
pub fn capability_registry(&self) -> &CapabilityRegistry
Returns a reference to the capability registry.
Sourcepub fn register_capability(
&mut self,
registration: CapabilityRegistration,
) -> Result<RegistrationOutcome, RegistryFailure>
pub fn register_capability( &mut self, registration: CapabilityRegistration, ) -> Result<RegistrationOutcome, RegistryFailure>
Registers a capability into the runtime’s registry.
Returns true when the capability was newly registered, false when
the same contract digest was already present (idempotent no-op).
§Errors
Returns RegistryFailure when contract validation fails or when a
different contract digest conflicts with an existing immutable version.
Sourcepub fn workflow_registry(&self) -> &WorkflowRegistry
pub fn workflow_registry(&self) -> &WorkflowRegistry
Returns a reference to the workflow registry.
Sourcepub fn workspace_applications(&self) -> &[WorkspaceApplicationRegistration]
pub fn workspace_applications(&self) -> &[WorkspaceApplicationRegistration]
Returns workspace application registrations loaded into this runtime.
Sourcepub fn workflow_registry_mut(&mut self) -> &mut WorkflowRegistry
pub fn workflow_registry_mut(&mut self) -> &mut WorkflowRegistry
Returns a mutable reference to the workflow registry.
Sourcepub fn register_workflow(
&mut self,
registration: WorkflowRegistration,
) -> Result<WorkflowRegistrationOutcome, WorkflowFailure>
pub fn register_workflow( &mut self, registration: WorkflowRegistration, ) -> Result<WorkflowRegistrationOutcome, WorkflowFailure>
Registers a workflow into the runtime’s workflow registry.
§Errors
Returns WorkflowFailure when the workflow is invalid, references a
missing capability, contains a cycle, or violates immutability.
Sourcepub fn execute_governed_model_dependency(
&self,
app_id: &str,
app_version: &str,
request: &GovernedModelExecutionRequest,
) -> Result<GovernedModelExecutionOutcome, GovernedModelExecutionError>
pub fn execute_governed_model_dependency( &self, app_id: &str, app_version: &str, request: &GovernedModelExecutionRequest, ) -> Result<GovernedModelExecutionOutcome, GovernedModelExecutionError>
Executes an app-declared model dependency through the governed inference surface.
§Errors
Returns inference::GovernedModelExecutionError when the app or
interface is not registered, model resolution fails, or provider
execution fails.
Source§impl<E> Runtime<E>where
E: LocalExecutor,
impl<E> Runtime<E>where
E: LocalExecutor,
Sourcepub fn execute(&self, request: RuntimeRequest) -> RuntimeExecutionOutcome
pub fn execute(&self, request: RuntimeRequest) -> RuntimeExecutionOutcome
Executes one runtime request against the current registry state.
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Runtime<E>
impl<E> !UnwindSafe for Runtime<E>
impl<E> Freeze for Runtime<E>
impl<E> Send for Runtime<E>
impl<E> Sync for Runtime<E>
impl<E> Unpin for Runtime<E>
impl<E> UnsafeUnpin for Runtime<E>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more